FileWatch Trigger application in Rust. The binary is named fwt
.
The application watches for any type of file changes in the recursively watched directory, and triggers the given action.
Currently able to perform the following action(s):
You may also choose to visit releases and download the latest version of statically built binary in the zip asset.
Alternatively, if you have the cargo
command, simply run
bash
cargo install rs-filewatch-trigger
For help:
bash
fwt -h
The following contains the help message:
```bash
USAGE:
fwt [FLAGS] [OPTIONS] --path
FLAGS: --force-poll Force using polling implementation, works for any platform -h, --help Prints help information --relative Use relative path instead of absolute path for path matches -V, --version Prints version information -v, --verbose Verbose mode (-v, -vv, -vvv)
OPTIONS:
-d, --delay
SUBCOMMANDS: cmd FileWatch Trigger to run various actions help Prints this message or the help of the given subcommand(s) ```
Assuming the current working directory is /home/xxx
:
bash
fwt -e 15 \
-f "*.jpg,*.png" \
-p . \
-v \
cmd --print-stdout "echo {path}: {event}"
Example output:
bash
/home/xxx/a.jpg: CREATED
The following contains the help message for this action:
```bash
USAGE:
fwt --path
FLAGS: -h, --help Prints help information --print-stderr Prints shell stderr to main stderr --print-stdout Prints shell stdout to main stdout -V, --version Prints version information
ARGS: