1.0.0 • Published 6 years ago

@umm/script-sync v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

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.
KeyDescriptionDefault
patternDesignation patterns as glob.-
overwriteOverwrite files if already exists.true
removeSourceRemove source files when finish copy.false
removeEmptyDirectoryRemove empty directory in source path after finish processing removeSource.false
removeDeletedFilesRemove files that do not exist on the source path.false

License

Copyright (c) 2018 Tetsuya Mori

Released under the MIT license, see LICENSE.txt