import js.mv.*;
class Main
{
static function main()
{
Mv.mv('source/file', 'dest/file', function(error) {
// done. it tried fs.rename first, and then falls back to
// piping the source file to the dest file and then unlinking
// the source file.
});
Mv.mv('source/dir', 'dest/a/b/c/dir', { mkdirp: true }, function(error) {
// done. it first created all the necessary directories, and then
// tried fs.rename, then falls back to using ncp to copy the dir
// to dest and then rimraf to remove the source dir
});
Mv.mv('source/file', 'dest/file', { clobber: false }, function(error) {
// done. If 'dest/file' exists, an error is returned
// with err.code === 'EEXIST'.
});
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
NodeJS mv library extern
License
ExternKit/extern-js-mv
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
NodeJS mv library extern
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published