Protected
_readyPrivate
storeStatic
Readonly
NamePrivate
_findINodeHelper function for findINode.
The parent directory of the file we are attempting to find.
The filename of the inode we are attempting to find, minus the parent.
string The ID of the file's inode in the file system.
Asynchronous access.
Synchronous access.
Private
addCreates a new node under a random ID. Retries 5 times before giving up in the exceedingly unlikely chance that we try to reuse a random GUID.
The GUID that the data was stored under.
Asynchronous chmod
.
Synchronous chmod
.
Asynchronous chown
.
Synchronous chown
.
Private
commitCommits a new file (well, a FILE or a DIRECTORY) to the file system with the given mode. Note: This will commit the transaction.
The path to the new file.
The type of the new file.
The mode to create the new file with.
The data to store at the file's data node.
The Inode for the new file.
Create the file at path p with the given mode. Then, open it with the given flag.
Test whether or not the given path exists by checking with the file system. Then call the callback argument with either true or false.
Test whether or not the given path exists by checking with the file system.
Private
findINodeFinds the Inode of the given path.
The path to look up.
The Inode of the path p.
memoize/cache
Private
getGiven the Inode of a directory, retrieves the corresponding directory listing.
Private
getINodeGiven the ID of a node, retrieves the corresponding Inode.
The transaction to use.
The corresponding path to the file (used for error messages).
The ID to look up.
Asynchronous link
.
Synchronous link
.
Private
makeAsynchronous mkdir
.
Mode to make the directory using. Can be ignored if the filesystem doesn't support permissions.
Synchronous mkdir
.
Mode to make the directory using. Can be ignored if the filesystem doesn't support permissions.
Opens the file at path p with the given flag. The file must exist.
A File object corresponding to the opened file.
Asynchronous readdir
. Reads the contents of a directory.
The callback gets two arguments (err, files)
where files
is an array of
the names of the files in the directory excluding '.'
and '..'
.
Synchronous readdir
. Reads the contents of a directory.
Asynchronous readlink.
Synchronous readlink.
Asynchronous realpath
. The callback gets two arguments
(err, resolvedPath)
.
Note that the Node API will resolve path
to an absolute path.
Synchronous realpath
.
Note that the Node API will resolve path
to an absolute path.
Private
removeRemove all traces of the given path from the file system.
The path to remove from the file system.
Does the path belong to a directory, or a file?
Update mtime.
Asynchronous rename. No arguments other than a possible exception are given to the completion callback.
Synchronous rename.
Asynchronous rmdir
.
Synchronous rmdir
.
Asynchronous symlink
.
can be either 'dir'
or 'file'
Synchronous symlink
.
can be either 'dir'
or 'file'
Asynchronous truncate
.
Synchronous truncate
.
Asynchronous unlink
.
Synchronous unlink
.
Change file timestamps of the file referenced by the supplied path.
Change file timestamps of the file referenced by the supplied path.
Static
isGenerated using TypeDoc
A "Synchronous key-value file system". Stores data to/retrieves data from an underlying key-value store.
We use a unique ID for each node in the file system. The root node has a fixed ID.
Todo
Introduce Node ID caching.
Todo
Check modes.