InternalProtected Optional_Protected_Current position
ProtectedclosedWhether the file is open or closed
ReadonlycontextProtecteddirtyWhether the file has changes which have not been written to the FS
ReadonlyflagReadonlyfsReadonlyinodeReadonlyinternalReadonlypathProtected_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.
Default implementation maps to sync.
Default implementation maps to syncSync.
ProtecteddisposeCleans up. This will not sync the file data to the FS
Optionalforce: booleanProtecteddisposeCleans up. This will not sync the file data to the FS
Optionalforce: booleanRead 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.
number of bytes written
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.
number of bytes written
Change the file timestamps of the file.
Change the file timestamps of the file.
Write buffer to the file.
Uint8Array 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.
bytes written
Write buffer to the file.
Uint8Array 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.
bytes written
Creates a file with
pathand, optionally, the given contents. Note that, if contents is specified, it will be mutated by the file.