-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmove-file.node.txt
25 lines (20 loc) · 1.46 KB
/
move-file.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
┏━━━━━━━━━━━━━━━┓
┃ MOVE-FILE ┃
┗━━━━━━━━━━━━━━━┛
ALTERNATIVES ==> # - move-file (preferred with Node)
# - cross-partition moves (parallel copy), create intermediate directories
# - node-mv:
# - not maintained
# - cross-partition moves (parallel copy), create intermediate directories, allow hard links
# - move-concurrently
# - not maintained
# - cross-partition moves (paralle copy)
# - deno rename (preferred with Deno)
VERSION ==> #3.1.0
moveFile[Sync] #Like FS.rename() except:
(PATH, PATH2[, OPTS])[->>] # - create intermediary directories if needs be
# - copy file on EXDEV errors (Linux cannot rename files between partitions)
OPTS.overwrite #BOOL (def: true). If false, throw if file already exists
OPTS.directoryMode #STR (def: 0o777)
OPTS.cwd #'DIR' (def: '.')
renameFile[Sync](...) #Same but validate that PATH|PATH2 are siblings