Author image Ivan Wills
and 1 contributors

NAME

file-watch - Watch files and directories for changes

VERSION

This documentation refers to file-watch version 0.005

SYNOPSIS

   file-watch [option] [file(s)]

 OPTIONS:
  -d --dir      Check directories
     --no-dir   Don't check directories (Default)
  -t --type[=]str
                Specify the type of file events to listen for, more than
                one event can be specified.
                 - IN_ACCESS
                 - IN_MODIFY
                 - IN_ATTRIB
                 - IN_CLOSE_WRITE
                 - IN_CLOSE_NOWRITE
                 - IN_OPEN
                 - IN_ALL_EVENTS
                 - IN_MOVED_FROM
                 - IN_MOVED_TO
                 - IN_CREATE
                 - IN_DELETE
                 - IN_DELETE_SELF
                 - IN_MOVE_SELF
                 - ALL - special pseudo event setting all events on so you can
                         see which ones are actually fired
  -r --report   When killed, a report will be generated of all files modified
  -c --command[=]'command to run'
                When a file is detected to have changed this command can be run

  -v --verbose  Show more detailed option
     --version  Prints the version information
     --help     Prints this help information
     --man      Prints the full documentation for file-watch

DESCRIPTION

file-watch uses iNotify to track when files change. The types of changes can be found in Linux::Inotify2.

Running Commands

When you use the --command option changes will be chunked and displayed every second. The program you run can find the files that triggered it by inspecting the environment variable $CHANGED which is a colon (:) separated list of files.

SUBROUTINES/METHODS

DIAGNOSTICS

DEPENDENCIES

INCOMPATIBILITIES

BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2014-2015 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.