This is an experimental technologyCheck the Browser compatibility table carefully before using this in production.
The File and Directory Entries API interface FileSystem
is used to represent a file system. These objects can be obtained from the filesystem
property on any file system entry. Some browsers offer additional APIs to create and manage file systems, such as Chrome's requestFileSystem()
method.
This interface will not grant you access to the users filesystem. Instead you will have a "virtual drive" within the browser sandbox. If you want to gain access to the users filesystem you need to invoke the user by eg. installing a Chrome extension. The relevant Chrome API can be found here.
Basic concepts
There are two ways to get access to a FileSystem
object:
- You can directly ask for one representing a sandboxed file system created just for your web app directly by calling
window.requestFileSystem()
. If that call is successful, it executes a callback handler, which receives as a parameter aFileSystem
object describing the file system. - You can get it from a file system entry object, through its
filesystem
property.
Properties
FileSystem.name
Read only- A
USVString
representing the file system's name. This name is unique among the entire list of exposed file systems. FileSystem.root
Read only- A
FileSystemDirectoryEntry
object which represents the file system's root directory. Through this object, you can gain access to all files and directories in the file system.
Specifications
Specification | Status | Comment |
---|---|---|
File and Directory Entries APIThe definition of 'FileSystem' in that specification. | Draft |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
FileSystem
|
Chrome Full support 7 Full support 7 Alternate Name' Uses the non-standard name: |
Edge Full support ≤18 Full support ≤18 Prefixed' Implemented with the vendor prefix: WebKit
Notes' Edge only supports this API in drag-and-drop scenarios using the the |
Firefox
Full support 50 |
IE
No support No |
Opera Full support 15 Full support 15 Prefixed' Implemented with the vendor prefix: webkit |
Safari
Full support 11.1 |
WebView Android Full support ≤37 Full support ≤37 Alternate Name' Uses the non-standard name: |
Chrome Android Full support 18 Full support 18 Alternate Name' Uses the non-standard name: |
Firefox Android
Full support 50 |
Opera Android Full support 14 Full support 14 Prefixed' Implemented with the vendor prefix: webkit |
Safari iOS
Full support 11.3 |
Samsung Internet Android Full support 1.0 Full support 1.0 Prefixed' Implemented with the vendor prefix: webkit |
name
|
Chrome
Full support 7 |
Edge
Full support ≤18 |
Firefox
Full support 50 |
IE
No support No |
Opera
Full support 15 |
Safari
Full support 11.1 |
WebView Android
Full support ≤37 |
Chrome Android
Full support 18 |
Firefox Android
Full support 50 |
Opera Android
Full support 14 |
Safari iOS
Full support 11.3 |
Samsung Internet Android
Full support 1.0 |
root
|
Chrome
Full support 7 |
Edge
Full support ≤18 |
Firefox
Full support 50 |
IE
No support No |
Opera
Full support 15 |
Safari
Full support 11.1 |
WebView Android
Full support ≤37 |
Chrome Android
Full support 18 |
Firefox Android
Full support 50 |
Opera Android
Full support 14 |
Safari iOS
Full support 11.3 |
Samsung Internet Android
Full support 1.0 |
Legend
- Full support
- Full support
- No support
- No support
- See implementation notes.'
- See implementation notes.
- Uses a non-standard name.'
- Uses a non-standard name.
- Requires a vendor prefix or different name for use.'
- Requires a vendor prefix or different name for use.
See also
- File and Directory Entries API
- Introduction to the File System API
FileSystemEntry
,FileSystemFileEntry
, andFileSystemDirectoryEntry
- MSDN article: WebKitFileSystem object
FileSystem by Mozilla Contributors is licensed under CC-BY-SA 2.5.