Skip to content

a simple cross-platform command line tool to monitor a directory for file changes

License

Notifications You must be signed in to change notification settings

codeplea/fsghost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

FsGhost - Cross-Platform File Change Monitoring in C

FsGhost logo

FsGhost is a tiny command-line tool to monitor and notify of file changes in a given directory. FsGhost works natively on both Windows and Linux and is self-contained in only 1 C file. Its only dependencies are the operating system headers for your platform.

Features

  • ANSI C with no external dependencies.
  • Contained in a single source file.
  • Simple.
  • Released under the zlib license - free for nearly any use.

Example Usage

Call fsghost with a single argument, the path of the directory you'd like to monitor.

mkdir test-dir
fsghost test-dir

FsGhost will then monitor that directory. If any files are created, written, or deleted, FsGhost will write that filename to the standard output.

Example Usage

Building

You can probably build by simply running make. If that doesn't work, try to compile main.c. It should be pretty easy.

FAQ

Does FsGhost do polling.

No. FsGhost uses the proper file-system APIs on each platform to get notified when changes take place. This means that it uses very few system resources when running, and will not bog down your machine. It's made to be run in the background for long periods of time.

For Windows, FsGhost uses the ReadDirectoryChangesW API. For Linux, it uses the inotify API.

About

a simple cross-platform command line tool to monitor a directory for file changes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published