Provides the ability to manage items on disk. This includes file
manipulation, reading / writing files, and opening files for additional
work. Only supported on the Deno runtime and will throw a SyntaxError if
attempting to run within a Web Browser.
- Source:
Members
(static, readonly) pathSeparator :string
Identifies the path separator for files on disk.
Type:
- string
- Source:
(static, readonly, nullable) tempPath :string
Identifies the temp directory on disk. Null is returned if on
web browser.
Type:
- string
- Source:
Methods
(static) cp(params) → {boolean}
Copies a file / directory from its currently source location to the
specified destination.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
true if carried out, false otherwise.
- Type
- boolean
(static) ls(params) → (nullable) {Array.<CFileInfo>}
List the files in the specified source location.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
Array of files found.
- Type
- Array.<CFileInfo>
(static) mkdir(params) → {boolean}
Makes a directory at the specified location.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
- Type
- boolean
(static) readFile(params) → {string|Uint8Array|null}
Reads a file to disk.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
- Type
- string | Uint8Array | null
(static) rm(params) → {boolean}
Removes a file or directory at the specified location.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
- Type
- boolean
(static) writeFile(params) → {boolean}
Writes a file to disk.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | The named parameters.
Properties
|
- Source:
Returns:
true if successful, false otherwise.
- Type
- boolean