Creates a new, empty MountableFileSystem.
Returns the file system that the path points to.
Create the file at path p with the given mode. Then, open it with the given flag.
Mounts the file system at the given mount point.
Opens the file at path p with the given flag. The file must exist.
The path to open.
The flag to use when opening the file.
Generated using TypeDoc
The MountableFileSystem allows you to mount multiple backend types or multiple instantiations of the same backend into a single file system tree. The file systems do not need to know about each other; all interactions are automatically facilitated through this interface.
For example, if a file system is mounted at /mnt/blah, and a request came in for /mnt/blah/foo.txt, the file system would see a request for /foo.txt.
You can mount file systems like so:
var mfs = new BrowserFS.FileSystem.MountableFileSystem(); mfs.mount('/data', new BrowserFS.FileSystem.XmlHttpRequest()); mfs.mount('/home', new BrowserFS.FileSystem.LocalStorage());
Since MountableFileSystem simply proxies requests to mounted file systems, it supports all of the operations that the mounted file systems support.
With no mounted file systems,
MountableFileSystem
acts as a simpleInMemory
filesystem.