Search completed in 1.15 seconds.
FileHandle API - Web APIs
he future. The FileHandle API allows for the manipulating of files, including creating files and modifying their content (unlike the File API). Because the files manipulated through that API can be physically stored on the device, the editing part uses a turn-based locking mechanism in order to avoid race issues. API Overview This API is based on the following interfaces: IDBDatabase.
mozCreateFileHandle (was called IDBDatabase.
mozCreateFileHandle.) IDBMutableFile (was previously FileHandle.) LockedFile FileRequest It also has connections with the File API, especially the File and Blob interfaces. Basic operations Create a FileHandle Because the intent is to allow the storage of files through IndexedDB, creating a FileHandle instance requires an IndexedDB Database. var IDBReq = indexedD...
...uest It also has connections with the File API, especially the File and Blob interfaces. Basic operations Create a FileHandle Because the intent is to allow the storage of files through IndexedDB, creating a FileHandle instance requires an IndexedDB Database. var IDBReq = indexedDB.open("myFileStorageDataBase"); IDBReq.onsuccess = function(){ var DB = this.result; var buildHandle = DB.
mozCreateFileHandle("test.txt", "plain/text"); buildHandle.onsuccess = function(){ var myFileHandle = this.result; console.log('handle', myFileHandle); }; };
mozCreateFileHandle() takes two arguments: a name and an optional type. Both of these are just descriptive and are not used by the database. However, they are important for the FileHandle object as it can generate File objects which inherit thei...
...the handle in a database (not necessarily the one used to create the FileHandle object). ...