Advance the current file position by the indicated number of positions.
Asynchronous fchmod
.
Asynchronous fchmod
.
Asynchronous close. Doesn't do anything, simply calls the cb.
Synchronous close. Doesn't do anything.
NONSTANDARD: Get the underlying buffer for this file. !!DO NOT MUTATE!! Will mess up dirty tracking.
Get the path to this file.
The path to the file.
Get the current file position.
We emulate the following bug mentioned in the Node documentation:
On Linux, positional writes don't work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file.
The current file position.
NONSTANDARD: Get underlying stats for this file. !!DO NOT MUTATE!!
Read data from the file.
The buffer that the data will be written to.
The offset within the buffer where writing will start.
An integer specifying the number of bytes to read.
An integer specifying where to begin reading from in the file. If position is null, data will be read from the current file position.
The number is the number of bytes read
Read data from the file.
The buffer that the data will be written to.
The offset within the buffer where writing will start.
An integer specifying the number of bytes to read.
An integer specifying where to begin reading from in the file. If position is null, data will be read from the current file position.
Resets the dirty bit. Should only be called after a sync has completed successfully.
Set the file position.
Asynchronous stat
.
Synchronous stat
.
Asynchronous sync. Doesn't do anything, simply calls the cb.
Synchronous sync. Doesn't do anything.
Asynchronous truncate.
Synchronous truncate.
Write buffer to the file. Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback.
Buffer containing the data to write to the file.
Offset in the buffer to start reading data from.
The amount of bytes to write to the file.
Offset from the beginning of the file where this data should be written. If position is null, the data will be written at the current position.
Write buffer to the file. Note that it is unsafe to use fs.writeSync multiple times on the same file without waiting for the callback.
Buffer containing the data to write to the file.
Offset in the buffer to start reading data from.
The amount of bytes to write to the file.
Offset from the beginning of the file where this data should be written. If position is null, the data will be written at the current position.
Generated using TypeDoc
File class for the InMemory and XHR file systems. Doesn't sync to anything, so it works nicely for memory-only files.