Append data to an existing file to the file system, when the directory does not exists it will be created.
path to the file to read
body to write to the file
Optionaloptions: OutputOptionswrite options
Create a new directory at the specified path. No error should be thrown when the directory already exists. Operations should be idempotent and recursive, so when creating a directory /a/b/c and /a or /a/b do not exists, these should be created as well.
path to the directory to create
Find files and or folders matching the specified glob pattern as an async iterable. If the result is not iterated completely, the search is stopped.
When you need the results as an array, use the Iterable.spreadAsync method to convert the async iterable into an array.
By default the current working directory is used as the base directory for the search.
You can specify multiple glob patterns to match by specifying an array of glob patterns.
When a limit is specified, the search is stopped after the specified number of results is reached.
When a depth is specified, the search does not go deeper than the specified depth.
Glob patterns to match
Optionaloptions: FindOptionsfind options
Async iterable of matching files and or folders
Find files matching the specified glob pattern(s)
Glob patterns to match files with
Get the file system as a buffer and return it.
Serialized file system
ProtectedglobReturns true if the path exists and is a folder, returns false when the path does not exists or is not a folder.
Path to check
Returns true if the path exists and is a file, returns false when the path does not exists or is not a file.
Path to check
Write a file to the file system, when the directory does not exists it will be created.
path to the file to read
Optionalbody: string | Buffer<ArrayBufferLike>body to write to the file
Optionaloptions: OutputOptionswrite options
Checks if the specified path exists on the file system
Path to check
Read the contents of a directs; returns an array with the files and folders contained in the specified directory.
Directory
Reads the specified file path into a NodeJS Buffer object
path to the file to read
Read a file and returns the file body as String
Get file statistics; returns undefined when the file does not exists
Path to check
Optionaloptions: StatsOptionsWrite a file to the file system, when the directory does not exists it will be created.
path to the file to read
Optionaldata: string | Buffer<ArrayBufferLike>data to write to the file
Optionaloptions: WriteOptionswrite options
StaticfromInstantiate a new memory file system from a buffer object containing the file system.
Buffer to read the file system from previously written by getBuffer
Memory file system
Memory file system that instead of writing to disk writes to memory and stores them in a JSON object.