Readonly
deviceInternal
fsThe file system that created the file
Readonly
pathGet the current file position.
Protected
statsRead data from the file.
The buffer that the data will be written to.
Optional
offset: numberThe offset within the buffer where writing will start.
Optional
length: numberAn integer specifying the number of bytes to read.
Promise resolving to the new length of the buffer
Read data from the file.
The buffer that the data will be written to.
Optional
offset: numberThe offset within the buffer where writing will start.
Optional
length: numberAn integer specifying the number of bytes to read.
Optional
position: numberAn integer specifying where to begin reading from in the file. If position is null, data will be read from the current file position.
Write buffer to the file.
Uint8Array containing the data to write to the file.
Optional
offset: numberOffset in the buffer to start reading data from.
Optional
length: numberThe amount of bytes to write to the file.
Optional
position: numberOffset 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.
Promise resolving to the new length of the buffer
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.
Optional
position: numberOffset 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.
The base class for device files This class only does some simple things: It implements
truncate
usingwrite
and it has non-device methods throw. It is up to device drivers to implement the rest of the functionality.