Filesystem Access
The File System Access API allows read, write and file management capabilities.
This API allows interaction with files on a user's local device or on a user-accessible network file system. The core functionality of this API includes reading files, writing or saving files, and accessing the directory structure.
Most interaction with files and directories is accomplished with fsPromises
methods from the Namespace wrapper class. The available fsPromises
methods on the Namespace wrapper class include: fs
, fsStaking
, fsWriteStream
, and fsReadStream
.
fs Method
The fs
method takes in three arguments:
method
: ThefsPromise
method to callpath
: The path for the express call...args
: Any remaining parameters for the FS call
Example:
fsStaking Method
The fsStaking
method takes in three arguments:
method
: ThefsPromise
method to callpath
: The path for the express call...args
: Any remaining parameters for the FS call
fsWriteStream Method
The fsWriteStream
method takes in one argument:
imagepath
: Astring
to the image path
fsReadStream Method
The fsReadStream
method takes in one argument:
imagepath
: Astring
to the image path
Last updated