Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.145.36.171
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp-musonza /
node_modules /
fs-extra /
docs /
Delete
Unzip
Name
Size
Permission
Date
Action
copy-sync.md
1.43
KB
-rw-r--r--
2017-03-13 14:27
copy.md
1.81
KB
-rw-r--r--
2017-05-04 23:39
emptyDir-sync.md
393
B
-rw-r--r--
2017-03-13 14:27
emptyDir.md
625
B
-rw-r--r--
2017-05-04 23:39
ensureDir-sync.md
394
B
-rw-r--r--
2017-03-13 14:27
ensureDir.md
580
B
-rw-r--r--
2017-05-04 23:39
ensureFile-sync.md
480
B
-rw-r--r--
2017-03-13 14:27
ensureFile.md
672
B
-rw-r--r--
2017-05-04 23:39
ensureLink-sync.md
428
B
-rw-r--r--
2017-03-13 14:27
ensureLink.md
636
B
-rw-r--r--
2017-05-04 23:39
ensureSymlink-sync.md
468
B
-rw-r--r--
2017-03-13 14:27
ensureSymlink.md
677
B
-rw-r--r--
2017-05-04 23:39
move-sync.md
511
B
-rw-r--r--
2017-03-13 14:27
move.md
832
B
-rw-r--r--
2017-05-04 23:39
outputFile-sync.md
729
B
-rw-r--r--
2017-03-13 14:27
outputFile.md
1
KB
-rw-r--r--
2017-05-04 23:39
outputJson-sync.md
617
B
-rw-r--r--
2017-03-13 14:27
outputJson.md
898
B
-rw-r--r--
2017-05-04 23:39
pathExists-sync.md
174
B
-rw-r--r--
2017-04-27 19:06
pathExists.md
643
B
-rw-r--r--
2017-04-27 19:06
readJson-sync.md
797
B
-rw-r--r--
2017-03-13 14:27
readJson.md
1.18
KB
-rw-r--r--
2017-05-04 23:39
remove-sync.md
299
B
-rw-r--r--
2017-03-13 14:27
remove.md
603
B
-rw-r--r--
2017-05-04 23:39
writeJson-sync.md
495
B
-rw-r--r--
2017-03-13 14:27
writeJson.md
736
B
-rw-r--r--
2017-05-04 23:39
Save
Rename
# copy(src, dest, [options, callback]) Copy a file or directory. The directory can have contents. Like `cp -r`. - `src` `<String>` - `dest` `<String>` - `options` `<Object>` - `overwrite` `<boolean>`: overwrite existing file or directory, default is `true`. _Note that the copy operation will silently fail if you set this to `false` and the destination exists._ Use the `errorOnExist` option to change this behavior. - `errorOnExist` `<boolean>`: when `overwrite` is `false` and the destination exists, throw an error. Default is `false`. - `dereference` `<boolean>`: dereference symlinks, default is `false`. - `preserveTimestamps` `<boolean>`: will set last modification and access times to the ones of the original source files, default is `false`. - `filter` `<Function>`: Function to filter copied files. Return `true` to include, `false` to exclude. This can also be a RegExp, however this is deprecated (See [issue #239](https://github.com/jprichardson/node-fs-extra/issues/239) for background). - `callback` `<Function>` ## Example: ```js const fs = require('fs-extra') fs.copy('/tmp/myfile', '/tmp/mynewfile', err => { if (err) return console.error(err) console.log('success!') }) // copies file fs.copy('/tmp/mydir', '/tmp/mynewdir', err => { if (err) return console.error(err) console.log('success!') }) // copies directory, even if it has subdirectories or files // Promise usage: fs.copy('/tmp/myfile', '/tmp/mynewfile') .then(() => { console.log('success!') }) .catch(err => { console.error(err) }) ``` **Using filter function** ```js const fs = require('fs-extra') const filterFunc = (src, dest) => { // your logic here // it will be copied if return true } fs.copy('/tmp/mydir', '/tmp/mynewdir', { filter: filterFunc }, err => { if (err) return console.error(err) console.log('success!') }) ```