https://github.com/alexrasch/filemonitorpinvoke
FileMonitorPInvoke is a open-source C# application that makes use of the Windows API functions, like FindFirstChangeNotification, FindNextChangeNotification, and ReadDirectoryChangesW, to easily track file changes in a specified directory.
https://github.com/alexrasch/filemonitorpinvoke
Last synced: about 1 month ago
JSON representation
FileMonitorPInvoke is a open-source C# application that makes use of the Windows API functions, like FindFirstChangeNotification, FindNextChangeNotification, and ReadDirectoryChangesW, to easily track file changes in a specified directory.
- Host: GitHub
- URL: https://github.com/alexrasch/filemonitorpinvoke
- Owner: AlexRasch
- License: mit
- Created: 2023-07-21T11:04:28.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-21T11:53:23.000Z (about 3 years ago)
- Last Synced: 2025-02-23T14:47:04.389Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# FileMonitor
FileMonitorPInvoke is a open-source C# application that makes use of the Windows API functions, like FindFirstChangeNotification, FindNextChangeNotification, and ReadDirectoryChangesW, to track file changes in a specified directory. It allows you to monitor file additions, deletions, and modifications. The project is licensed under the permissive MIT License, allowing everyone to freely use, modify, and include the code in their projects, as long as they credit the original author.
**Disclaimer:**
While FileMonitorPInvoke provides a way to track file changes using Windows API functions, you may also consider using the built-in [FileSystemWatcher](https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher) class in C#. FileSystemWatcher offers a more feature-rich and managed solution with simplified event-driven file monitoring, which may better suit your needs. ¯\_(ツ)_/¯
## Inspiration
The application is loosely based on the example from Microsoft's documentation [Obtaining Directory Change Notifications](https://learn.microsoft.com/en-us/windows/win32/fileio/obtaining-directory-change-notifications), providing a reliable and simplified solution for file monitoring.
## Special Thanks
A heartfelt special thanks to [Mario](https://github.com/mariob) for his valuable inputs and generous support.