Classes
Members
# hash
Methods
# async copyTo(dest, options) → {Promise.<FSFile>}
Copy file. If dest is FSDir, copy file in it with source name.
Parameters:
Name | Type | Description |
---|---|---|
dest |
string | FSDir | FSFile | |
options |
copyToOptions | is an optional parameter that specifies the behavior of the copy operation. COPYFILE_EXCL: The copy operation will fail if dest already exists. COPYFILE_FICLONE: 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: 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. |
return FSFile of destination file
Promise.<FSFile>
# async isExists()
Checks is file exits. If you need write or read file
use isWritable or isReadable to check if it possible.
# async moveTo(destDir) → {Promise.<FSFile>}
Moves file to destination directory
Parameters:
Name | Type | Description |
---|---|---|
destDir |
FSDir | destination directory |
- destination file
Promise.<FSFile>
# async rename(targetName) → {Promise.<FSFile>}
Rename file to target
Parameters:
Name | Type | Description |
---|---|---|
targetName |
string | name of target file |
- renamed file
Promise.<FSFile>