文件复制的常量
以下常量旨在与 fs.copyFile()
一起使用。
The following constants are meant for use with fs.copyFile()
.
Constant | Description |
---|---|
COPYFILE_EXCL |
If present, the copy operation will fail with an error if the destination path already exists. |
COPYFILE_FICLONE |
If present, the copy operation will attempt to create a copy-on-write reflink. If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. |
COPYFILE_FICLONE_FORCE |
If present, the copy operation will attempt to create a copy-on-write reflink. If the underlying platform does not support copy-on-write, then the operation will fail with an error. |
The definitions are also available on Windows.