Synchronously tests whether or not the given path exists by checking with the file system.
A path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
Asynchronously read a directory.
A path to a directory.
Asynchronously reads the entire contents of a file.
A path to a file. If a file descriptor is provided, the underlying file will not be closed automatically.
An object that may contain an optional flag.
If a flag is not provided, it defaults to 'r'.
Returns null if any error occurs while reading a file
Asynchronously reads the entire contents of a file.
A path to a file. If a file descriptor is provided, the underlying file will not be closed automatically.
Either the encoding for the result, or an object that contains the encoding and an optional flag.
If a flag is not provided, it defaults to 'r'.
Returns null if any error occurs while reading a file
Asynchronously reads the entire contents of a file.
A path to a file. If a file descriptor is provided, the underlying file will not be closed automatically.
Either the encoding for the result, or an object that contains the encoding and an optional flag.
If a flag is not provided, it defaults to 'r'.
Returns null if any error occurs while reading a file
Asynchronously reads the entire contents of a file.
A path to a file. If a file descriptor is provided, the underlying file will not be closed automatically.
Returns null if any error occurs while reading a file.
Resolve a relative path starting from your plugin directory to an absolute path.
Asynchronously writes data to a file, replacing the file if it already exists.
A path to a file. If a file descriptor is provided, the underlying file will not be closed automatically.
The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
If encoding is not supplied, the default of 'utf8' is used.
If mode is not supplied, the default of 0o666 is used.
If mode is a string, it is parsed as an octal integer.
If flag is not supplied, the default of 'w' is used.
Asynchronously writes data to a file, replacing the file if it already exists.
A path to a file. If a file descriptor is provided, the underlying file will not be closed automatically.
The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
Generated using TypeDoc
Filesystem IO
These are designed to match nodejs
fsmodule.DO NOT use IO for savedata. Please use DB namespace so your data can be managed by WebUI.
Also, due to difference between operating systems, you should always prepare your files using ascii path. Both UTF-8 and local encodings will have cross-platform compatibility issues.