RsvimFs
The Rsvim.fs global object for file system and file IO.
Example
// Create a alias to 'Rsvim.fs'.
const fs = Rsvim.fs;
Classes
| Class | Description |
|---|---|
The File object that access to an open file on filesystem. See |
Type Aliases
| Type Alias | Description |
|---|---|
Open options. tip It is same with std::fs::OpenOptions in rust std library. See |
Functions
| Function | Description |
|---|---|
Open a file and resolve to an instance of RsvimFs.File. The file does not need to previously exist if using the Throws Throws TypeError if any parameters are invalid. Or throws Error if failed to open/create the file. Example | |
The sync version of open. Throws Example | |
Read a file in binary mode, i.e. into an array of bytes buffer, without open/close a file descriptor/handle. Throws Throws TypeError if the file name is invalid. Or throws Error if failed to read the file. Example | |
The sync version of readFile. Throws Example | |
Read a file in text mode, i.e. into a string, without open/close a file descriptor/handle. Throws Throws TypeError if the file name is invalid. Or throws Error if failed to read the file. Example | |
The sync version of readTextFile. Throws Example |