Synchronously checks if the file or directory at the provided path is accessible. If it is accessible, the method does nothing. If it is not accessible, an error is thrown.
Synchronously copies the file at the source path to the destination path.
Synchronously retrieves the status of the file or directory at the provided path. Does not dereference symbolic links.
Synchronously creates a directory at the provided path.
If options.recursive is true, the full path will be created including any missing
parent directories, and the path of the first directory created will be returned.
Otherwise, returns undefined.
Optionaloptions: { recursive: boolean }Synchronously reads the contents of the directory at the provided path.
If options.withFileTypes is true, returns the contents as an array of Entry
objects. Otherwise, returns the contents as an array of strings containing the names
of each entry.
Optionaloptions: { withFileTypes: boolean }Synchronously reads the contents of the file at the provided path.
If options.encoding is provided, the contents will be returned as a string. Otherwise,
the contents will be returned as a Buffer.
Optionaloptions: { flag: "r" }Optionaloptions: { encoding?: Encoding; flag?: "r" }Synchronously computes the canonical path by resolving ., .. and symbolic links.
Synchronously renames the file or directory at the old path to the new path.
Synchronously deletes the file or directory at the provided path.
Optionaloptions: { force?: boolean; recursive?: boolean }Synchronously retrieves the status of the file or directory at the provided path.
Synchronously writes the provided content to the file at the provided path.
Optionaloptions: { encoding: Encoding }
A file system API based on a subset of the
fsmodule from Node.js.