Commit ed0b62c
fs: add support for mode flag to specify the copy behavior
`fs.copyFile()` supports copy-on-write operation
if the underlying platform supports it by passing a mode flag.
This behavior was added in
a16d88d.
This patch adds `mode` flag to `fs.cp()`, `fs.cpSync()`,
and `fsPromises.cp()` to allow to change their behaviors
to copy files.
This test case is based on the test case that was introduced
when we add `fs.constants.COPYFILE_FICLONE`.
a16d88d.
This test strategy is:
- If the platform supports copy-on-write operation,
check whether the destination is expected
- Otherwise, the operation will fail
and check whether the failure error information is expected.
Fixes: #47080
PR-URL: #47084
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent d9448b8 commit ed0b62cCopy full SHA for ed0b62c
File tree
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedOpen diff view settings
Filter options
- doc/api
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedOpen diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
5158 | 5158 | |
5159 | 5159 | |
5160 | 5160 | |
5161 | | - |
| 5161 | + |
5162 | 5162 | |
5163 | 5163 | |
5164 | 5164 | |
|
0 commit comments