Chapter 1. Introduction
As we move from an offline world to a completely online world, we’re demanding more from the Web, and more from web applications. Browser implementers are adding richer APIs by the day to support complex use cases. APIs for things like real-time communication, graphics, and client-side (offline) storage.
One area where the Web has lacked for some time is file I/O. Interacting with binary data and organizing that data into a meaningful hierarchy of folders is something desktop software has been capable of for decades. How amazing would it be if web apps could do the same? The lack of true filesystem access has hindered web applications from moving forward. For example, how can a photo gallery work offline without being able to save images locally? The answer is it can’t! We need something more powerful.
The HTML5 File API: Directories and System aims to fill this void. The specification defines a means for web applications to read, create, navigate, and write to a sandboxed section of the user’s local filesystem. The entirety of the Filesystem API can be broken down into a number of different related specifications:
Reading and manipulating files:
File/Blob,FileList,FileReaderCreating and writing:
BlobBuilder,FileWriterDirectories and filesystem access:
DirectoryReader,FileEntry/DirectoryEntry,LocalFileSystem
The specification defines two versions (asynchronous and synchronous) of the same API. The asynchronous API is useful for normal applications and prevents ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access