-
Notifications
You must be signed in to change notification settings - Fork 0
NativeFileSystem
Module Name : NativeFileSystem
Path : file/NativeFileSystem.js
The NativeFileSystem module provides an API for accessing and working with files and directories on the users system. It follows the w3c File System API Draft Specification. From the source comments, it appears that is was implemented using April 11, 2011 draft of the specification.
var NativeFileSystem = require("file/NativeFileSystem").NativeFileSystem;
var DirectoryEntry = NativeFileSystem.DirectoryEntry;
Currently, the only encoding supported is UTF-8 (utf-8), which can be accessed via the following constant:
NativeFileSystem.Encodings.UTF8
Currently, any errors that occur which do not map to standard FileError errors, will be mapped to FileError.SECURITY_ERR (as specified by the File API draft).
This includes:
- ERR_UNKNOWN
- ERR_INVALID_PARAMS
- ERR_UNSUPPORTED_ENCODING
If you run into a FileError.SECURITY_ERR while working with the API, you should debug as if it is a security error, or one of the errors listed above.
- Exploring the FileSystem APIs
- W3C FileAPI Draft Specification
- HTML5 Rocks FileSystem Articles
- IANA Official Names of Character Sets on the Internet : These should be used to specify encodings, although, as noted before, they are not always correct.