https://github.com/andreaskoch/go-fswatcher
fswatcher is a cross platform filesystem watcher which allows you to execute a custom command every time a file or folder changes
https://github.com/andreaskoch/go-fswatcher
Last synced: 2 months ago
JSON representation
fswatcher is a cross platform filesystem watcher which allows you to execute a custom command every time a file or folder changes
- Host: GitHub
- URL: https://github.com/andreaskoch/go-fswatcher
- Owner: andreaskoch
- License: other
- Created: 2013-08-03T11:32:55.000Z (almost 13 years ago)
- Default Branch: develop
- Last Pushed: 2015-11-22T20:24:22.000Z (over 10 years ago)
- Last Synced: 2026-01-26T13:45:12.959Z (5 months ago)
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-fswatcher
Watch a file or folder for changes and execute a custom command.
## Usage
### Watch a file for changes
```bash
go-fswatcher -path some-file.txt -command "some-command"
```
### Watch a folder for changes
```bash
go-fswatcher -path some-folder -command "some-command"
```
If you want to watch for changes recursivly you can add the `recurse` option:
```bash
go-fswatcher -path some-folder -recurse -command "some-command"
```
## Examples
### Using go-fswatcher to autobuild your go applications
Build your go application everytime a file changes in your package directory.
```bash
go-fswatcher -path $GOPATH/src/github.com/andreaskoch/allmark -recurse -command "go install"
```
## Build Status
[](https://travis-ci.org/andreaskoch/go-fswatcher)
## Dependencies
- [github.com/andreaskoch/go-fswatch](https://github.com/andreaskoch/go-fswatch) for monitoring the filesystem for changes
## Contribute
If you have an idea how to make this little tool better please send me a message or a pull request.
All contributions are welcome.