WritableFilesystemAPI
Functions
Link copied to clipboard
Link copied to clipboard
Create a directory, asynchronously, specified by the provided path.
abstract fun mkdir(path: Path, options: MkdirOptions = MkdirOptions.DEFAULTS, callback: MkdirCallback)
Create a directory, synchronously, specified by the provided path.
Link copied to clipboard
abstract fun writeFile(path: Path, data: ByteArray, options: WriteFileOptions = WriteFileOptions.DEFAULTS, callback: WriteFileCallback)
abstract fun writeFile(path: Path, data: String, options: WriteFileOptions = WriteFileOptions.DEFAULTS, callback: WriteFileCallback)
Writes the contents of a file at the specified path; provides the results or an error to the callback. This variant accepts a polyglot Value.
Link copied to clipboard
Writes the contents of a file at the specified path; provides the results or an error to the callback. This variant accepts a polyglot Value.
abstract fun writeFileSync(path: Path, data: ByteArray, options: WriteFileOptions = WriteFileOptions.DEFAULTS)
Writes the contents of a file at the specified path synchronously; throws if an error prevents the file from being written. This variant accepts a ByteArray.
abstract fun writeFileSync(path: Path, data: String, options: WriteFileOptions = WriteFileOptions.DEFAULTS)
Writes the contents of a file at the specified path synchronously; throws if an error prevents the file from being written. This variant accepts a String.