watchfs

command module
v0.0.0-...-951b21f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2014 License: BSD-3-Clause Imports: 9 Imported by: 0

README

WatchFS

WatchFS is a tool that monitors file system for changes and runs specified command after the change.

Install

The tool can be installed using "go get" command:

  $ go get -u github.com/igm/watchfs

Usage

Simple notification after any change on the file system:

  $ watchfs echo "change!!!"

As the original purpose of this tool was to execute go tests automatically after the source code change the format to filter notification for *.go files can following:

  $ watchfs -f "\.go$" go test 

To specify a different time wait period after a change (or set of changes) occurs use timeout parameter:

  $ watchfs -t 250ms go test

For the full ist of available parameters and the defaults run command without any parameters:

  $ watchfs
Limitations

Current version supports shallow directory monitoring only. Recursive file system monitoring is not supported.

Timeout

Usually file system emits several various events when editing a file in a editor. For that purpose timeout parameter defines how long to wait before executing the command. The wait period starts again after any filesystem event.

Documentation

Overview

Command watchfs monitors directory for changes and executes a given command after each change.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL