Methods
delete(fileObject) → {Promise}
See the documentation of the delete() method in
the parent class for the definition of how this method must behave. It
implements the requirements specified there for a flat file system in the
browser's localStorage
object, as defined at the documentation for this class.
Because this is a flat file system, any file object with a nonempty path member will not exist, regardless of its filename, and will therefore result in an error being thrown.
Parameters
-
fileObject
Object
as documented in the FileSystem class
Returns
-
Promise
as documented in the abstract method of the parent class
Source
has(fileObject) → {Promise}
See the documentation of the has() method in the
parent class for the definition of how this method must behave. It
implements the requirements specified there for a flat file system in the
browser's localStorage
object, as defined at the documentation for this class.
Because this is a flat file system, any file object with a nonempty path member will not exist, regardless of its filename, and will therefore result in a false value being resolved from the promise.
Parameters
-
fileObject
Object
as documented in the FileSystem class
Returns
-
Promise
as documented in the abstract method of the parent class
Source
list(fileObject) → {Promise}
See the documentation of the list() method in the
parent class for the definition of how this method must behave. It
implements the requirements specified there for a flat file system in the
browser's localStorage
object, as defined at the documentation for this class.
In particular, because this is a flat file system, no parameter should be passed to attempt to list files in a subfolder, since there are no subfolders. Any attempt to do so will result in an error, unless the parameter is a file object with an empty string for its path.
Parameters
-
fileObject
Object
as documented in the FileSystem class
Returns
-
Promise
as documented in the abstract method of the parent class
Source
read(fileObject) → {Promise}
See the documentation of the read() method in the
parent class for the definition of how this method must behave. It
implements the requirements specified there for a flat file system in the
browser's localStorage
object, as defined at the documentation for this class.
Because this is a flat file system, any file object with a nonempty path member will not exist, regardless of its filename, and will therefore result in an error being thrown.
Parameters
-
fileObject
Object
as documented in the FileSystem class
Returns
-
Promise
as documented in the abstract method of the parent class
Source
write(fileObject) → {Promise}
See the documentation of the write() method in
the parent class for the definition of how this method must behave. It
implements the requirements specified there for a flat file system in the
browser's localStorage
object, as defined at the documentation for this class.
Because this is a flat file system, any file object with a nonempty path member will not exist, regardless of its filename, and will therefore result in an error being thrown.
Parameters
-
fileObject
Object
as documented in the FileSystem class
Returns
-
Promise
as documented in the abstract method of the parent class