Title

Global

Members

# constant cwd

Shortcut for FSPath(process.cwd())

View Source index.ts, line 54

# constant dirname

Shortcut for FSPath(__dirname)

View Source index.ts, line 58

# 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

View Source index.ts, line 95

# 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.

View Source index.ts, line 46

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 home

Shortcut for FSPath(homedir())

View Source index.ts, line 62

# 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.

View Source index.ts, line 76

# constant range

Returns FSAsyncIterator that takes in a starting index and ending index then iterates thru all integers from start to end

View Source index.ts, line 110

# constant tmp

Shortcut for FSPath(tmpdir())

View Source index.ts, line 66

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.

View Source fs-file.class.ts, line 180