Members
# constant envPath
Returns FSPath for environment variable.
If environment variable whith given name not exists,
Then return FSPath for provided fallback value,
if no fallback value provided then returns nothing
# constant FSPath
Creates path to filesystem object. Can be chained with any
key name wich act as path segment.
WARNING: Do not return FSPath with Promise resolve. This leads to unexpected behavior.
Example
FSPath(__dirname).node_modules //work as path.join(__dirname, "node_modules")
FSPath(__dirname)["package.json"] //work as path.join(__dirname, "package.json")
// When path completed you can get further operation to call it as function.
FSPath(__dirname).node_modules().asDir() //At this point you can use FSDir
FSPath(__dirname)["package.json"]().asFile() //At this point you can use FSFile
# constant mkdtemp
Creates a unique temporary directory inside os tmpdir.
Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
Due to platform inconsistencies, avoid trailing X characters in prefix.
Some platforms, notably the BSDs, can return more than six random characters,
and replace trailing X characters in prefix with random characters.
The created directory path is passed as a string to the callback's second parameter.
# constant range
Returns FSAsyncIterator that
takes in a starting index and ending index then iterates
thru all integers from start to end
Type Definitions
object
# copyToOptions
Options that specifies the behavior of the copyTo operation
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
COPYFILE_EXCL |
boolean |
<optional> |
If true, then the copy operation will fail if dest already exists. , COPYFILE_FICLONE_FORCE: The copy operation will attempt to create a , copy-on-write reflink. If the platform does not support copy-on-write, then the operation will fail. |
COPYFILE_FICLONE |
boolean |
<optional> |
If true then the copy operation will attempt to create a copy-on-write reflink. , If the platform does not support copy-on-write, then a fallback copy mechanism is used. |
COPYFILE_FICLONE_FORCE |
boolean |
<optional> |
If true then the copy operation will attempt to create a copy-on-write reflink. , If the platform does not support copy-on-write, then a fallback copy mechanism is used. |