npm.io
1.0.0 • Published 8 years ago

@umm/script-sync

Licence
MIT
Version
1.0.0
Deps
3
Size
13 kB
Vulns
0
Weekly
0

MIT License CircleCI

sync

Synchronize some files and directories like rsync.

Usage

let sync = require('sync');

sync("path/to/source", "path/to/destination"); // returns Promise object

Signature

sync(<Source Path>, <Destination Path>, [<Patterns>])

Source Path
  • Copy source path
Destination Path
  • Copy destination path
Patterns
  • Designation patterns as array of string or object.
String
  • Designation patterns as glob.
Object
  • Designation detail of the pattern.
Key Description Default
pattern Designation patterns as glob. -
overwrite Overwrite files if already exists. true
removeSource Remove source files when finish copy. false
removeEmptyDirectory Remove empty directory in source path after finish processing removeSource. false
removeDeletedFiles Remove files that do not exist on the source path. false

License

Copyright (c) 2018 Tetsuya Mori

Released under the MIT license, see LICENSE.txt