-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API : Changes in `filecopy_error` enum. Internal changes to spelling and formatting. Util : Changes to using argv[0] for program name and FILECOPY_VERSION => VERSION, plus formatting improvements and changes to handle `filecopy_error`s.
- Loading branch information
Showing
4 changed files
with
54 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,20 @@ | ||
# filecopy v1.0 | ||
## Utility Usage | ||
|
||
### About | ||
filecopy is both a tiny utility + a tiny library/API for copying a stream's contents to another in a _simple , safe and efficient_ manner. | ||
|
||
### Utility Usage | ||
_If you can use `cp` , you can use `filecopy` !_ | ||
|
||
1. Clone the repo, compile all `.c` files in it. For example, on GNU/Linux or macOS , you might run : | ||
1. Compile all `.c` files in the repo. For example, on \*nix systems , you might run : | ||
```sh | ||
git clone https://github.com/a-p-jo/filecopy | ||
cc filecopy/*.c -o filecopy -Ofast -flto | ||
git clone https://github.com/a-p-jo/filecopy.git | ||
cc filecopy/*.c -o fcp -Ofast -flto # Compile to exe named "fcp" | ||
rm -r filecopy # Repo no longer needed, delete it | ||
``` | ||
2. Get the help menu : | ||
``` | ||
$ filecopy | ||
filecopy v1.0 : A simple, safe, performant and reliable file copying program. | ||
$ ./fcp | ||
fcp v1.0 | ||
Usage : filecopy <src> [dst (optional, stdout by default)] [overwrite dst? (y/n) (optional)] | ||
Copies the contents of src to dst if given, else to stdout. | ||
Copies the contents of src to dst (if given, else to stdout). | ||
If dst does not exist, creates it. If it pre-exists, if 'y' is specified, continues. | ||
If 'n' is specified, aborts. Else, asks for permission before overwriting. | ||
Example : filecopy archlinux.iso /dev/sda y | ||
``` | ||
NOTES : | ||
|
||
- _`filecopy` will treat arguments *exactly* in the order specified above._ | ||
|
||
- _Any arguments beyond the first three, and the third if invalid, are ignored automatically_. | ||
|
||
Examples : | ||
``` | ||
filecopy ~/.zshrc /mnt/backups/zhrc.bak y | ||
filecopy /dev/sda | gzip > drive.bak | ||
filecopy settings.json D:\backups\settings.json | ||
Example : fcp archlinux.iso /dev/sda y | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters