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 |
|---|---|
File information, it contains 3 groups of properties:
| |
Mkdir options. | |
Open options. tip It is same with std::fs::OpenOptions in rust std library. See | |
See |
Functions
| Function | Description |
|---|---|
Create hard link from a file path. Throws Throws TypeError if any parameter is invalid. Or throws Error if failed to create hard link from the file. Example | |
Sync version of link. Example | |
Get the status of a file by path. note This api doesn't follow symbolic link. See Throws Throws TypeError if the file name is invalid. Or throws Error if failed to get file status. Example | |
Sync version of lstat. Example | |
Make a directory. Throws Throws TypeError if any parameter is invalid. Or throws Error if failed to create hard mkdir from the file. Example | |
Sync version of mkdir. Example | |
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 | |
Sync version of open. 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 | |
Sync version of readFile. 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 | |
Sync version of readTextFile. Example | |
Get the status of a file by path. note This api follows symbolic link. See Throws Throws TypeError if the file name is invalid. Or throws Error if failed to get file status. Example | |
Sync version of stat. Example | |
Create symbolic link from a file path. On Windows platforms, you should specify the 3rd parameter "options" with below 3 options:
Throws Throws TypeError if any parameter is invalid. Or throws Error if failed to create symbolic link from the file. Example | |
Sync version of symlink. Example |