2.1.0
Class representing a File Descriptor
(I)
(number)
Gets an INode.
I
Reads from this file descriptor into a buffer. It will always try to fill the input buffer. If position is specified, the position change does not persist. If the current file descriptor position is greater than or equal to the length of the data, this will read 0 bytes.
number
Class that manages all FileDescriptors
(INodeManager)
Creates a file descriptor. This will increment the reference to the iNode preventing garbage collection by the INodeManager.
[FileDescriptor<any>, number]
Gets the file descriptor object.
(number)
FileDescriptor<any>?
Class representing an iNode.
(INodeManager)
Class representing a file.
Extends INode
(INodeManager)
Class representing a directory.
Extends INode
(INodeManager)
This is to be called when all hardlinks and references to this directory reduce to 0.
The destructor here is about unlinking the parent directory.
Because the ..
will no longer exist.
void
Class representing a Symlink.
Extends INode
Class representing a character device.
Extends INode
Class that manages all iNodes including creation and deletion
(DeviceManager)
Decides whether to garbage collect the inode.
The true usage count is the hardlink count plus the private reference count.
Usually if the true usage count is 0, then the inode is garbage collected.
However directories are special cased here, due to the .
circular hardlink.
This allows directories to be garbage collected even when their usage count is 1.
This is possible also because there cannot be custom hardlinks to directories.
($Subtype<INode>)
void
Default root uid.
Type: number
Default root gid.
Type: number
Default root directory permissions of rwxr-xr-x
.
Default file permissions of rw-rw-rw-
.
Default directory permissions of rwxrwxrwx
.
Default symlink permissions of rwxrwxrwx
.
Applies umask to default set of permissions.
number
Permission checking relies on ownership details of the iNode. If the accessing user is the same as the iNode user, then only user permissions are used. If the accessing group is the same as the iNode group, then only the group permissions are used. Otherwise the other permissions are used.
number
Checks the desired permissions with user id and group id against the metadata of an iNode. The desired permissions can be bitwise combinations of constants.R_OK, constants.W_OK and constants.X_OK.
boolean
Class representing Stat metadata.
(Metadata)
Class representing a ReadStream.
Extends Readable
Class representing a WriteStream.
Extends Writable
Class representing a virtual filesystem.
(number
= 0o022
)
((number | null)
= null
)
(DeviceManager
= new DeviceManager()
)
(INodeManager
= new INodeManager(devMgr)
)
(FileDescriptorManager
= new FileDescriptorManager(iNodeMgr)
)
Prefer the posix join function if it exists. Browser polyfills of the path module may not have the posix property.
Asynchronous callback backup.
Type: callback
(any)
Class representing a file system error.
Extends Error