Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarifying behavior with example #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@ errors arise, rather than attempting to continue while logging errors. The defau

If there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.

## Small example
Given the following directory structure
```
./folder1/.
./folder1/..
./folder1/readme.txt
```
run
```
ncp folder1 folder2
```
To get the resulting structure
```
./folder1/.
./folder1/..
./folder1/readme.txt
./folder2/.
./folder2/..
./folder2/readme.txt
```
Since the bash cp -r differs in behavior when the copying into an existing directory , it is worth noting that ncp _does not_ copy the source directory into the destination directory, and instead copies the contents as is likely desired.

## Programmatic usage

Programmatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error.
Expand Down