Creates a file with the given path and, optionally, the given contents. Note that, if contents is specified, it will be mutated by the file!
The file system that created the file.
The stats object for the given file. PreloadFile will mutate this object. Note that this object must contain the appropriate mode that the file was opened as.
Optional contents: Uint8ArrayA buffer containing the entire contents of the file. PreloadFile will mutate this buffer. If not specified, we assume it is a new file.
Protected _bufferProtected _dirtyProtected _flagProtected _fsProtected _pathProtected _posProtected _statGet 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.
[Number] The current file position.
Protected isProtected resetGenerated using TypeDoc
An implementation of the File interface that operates on a file that is completely in-memory. PreloadFiles are backed by a Uint8Array.
This is also an abstract class, as it lacks an implementation of 'sync' and 'close'. Each filesystem that wishes to use this file representation must extend this class and implement those two methods.
Todo
'close' lever that disables functionality once closed.