Wraps a file system, and uses the given folder as its root.
The folder to use as the root directory.
The file system to wrap.
Create the file at path p with the given mode. Then, open it with the given flag.
Initialize the file system. Ensures that the wrapped file system has the given folder.
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.
Creates a FolderAdapter instance with the given options.
Generated using TypeDoc
The FolderAdapter file system wraps a file system, and scopes all interactions to a subfolder of that file system.
Example: Given a file system
foo
with folderbar
and filebar/baz
...BrowserFS.configure({ fs: "FolderAdapter", options: { folder: "bar", wrapped: foo } }, function(e) { var fs = BrowserFS.BFSRequire('fs'); fs.readdirSync('/'); // ['baz'] });