@umm/script-sync
v1.0.0
Published
Synchronize files like rsync uses glob.
Downloads
5
Keywords
Readme
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