Skip to content

Watching tools

🛠️ Tools · ⬅ Top


watchDirectory

Watch a directory

Usage

watchDirectory [ --help ] [ --handler handler ] [ --verbose ] [ --file modifiedFile ] [ --modified modifiedTimestamp ] [ --timeout secondsToRun ] [ --state stateFile ] directory [ findArguments ... ]

Watch a directory

Arguments

  • --help - Optional. Flag. Display this help.
  • --handler handler - Optional. Function. Use this error handler instead of the default error handler.
  • --verbose - Optional. Flag. Be verbose.
  • --file modifiedFile - Optional. File. Last known modified file in this directory.
  • --modified modifiedTimestamp - Optional. UnsignedInteger. Last known modification timestamp in this directory.
  • --timeout secondsToRun - Optional. UnsignedInteger. Last known modification timestamp in this directory.
  • --state stateFile - Optional. File. Output of fileModificationTimes will be saved here (and modified)
  • directory - Required. Directory. Directory to watch
  • findArguments ... - Optional. Arguments. Passed to find to filter the files examined.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error