digcat / fswatcher Goto Github PK
View Code? Open in Web Editor NEWThis project forked from acken/fswatcher
Cross platform multi-strategy file system watcher
License: MIT License
This project forked from acken/fswatcher
Cross platform multi-strategy file system watcher
License: MIT License
A cross platform file system watcher for .Net and Mono FSWatcher uses various strategies to solve the nightmare that is file system events. It uses a variation of native events and raw polling determined by what is available. The native .Net file system watcher is completely unreliable with it's overflow exceptions. FSWatcher solves that and makes sure you are notified about all file system changes. Getting started After cloning this repository run deploy.bat if you are on windows or deploy.sh if you are on Linux or MacOSX. When deploy is done you will find the binary files in the ReleaseBinaries directory. FSWatcher.Console.exe is just a command line utility. Reference FSWatcher.dll in your project and use the following code to start listening for file system events: var watcher = new Watcher( watch_directory, (s) => Console.WriteLine("Directory created " + s), (s) => Console.WriteLine("Directory deleted " + s), (s) => Console.WriteLine("File created " + s), (s) => Console.WriteLine("File changed " + s), (s) => Console.WriteLine("File deleted " + s)); watcher.Watch(); .... watcher.StopWatching(); Additional features is manually setting the polling frequency. By default it is set to 4 times the time it takes to create a file system snapshot of the directory that is being watched. There are also properties showing watcher strategies: var settings = watcher.Settings; // Overriding the polling frequency in milliseconds settings.SetPollFrequencyTo(10000); // Chosen strategy // Are we polling continuously settings.ContinuousPolling // What events are we provided with automatically // If not provided automatically we rely on polling settings.CanDetectEventedDirectoryCreate settings.CanDetectEventedDirectoryDelete settings.CanDetectEventedDirectoryRename settings.CanDetectEventedFileCreate settings.CanDetectEventedFileChange settings.CanDetectEventedFileDelete settings.CanDetectEventedFileRename Look at the FSWatcher.Console/Program.cs for a working sample. FSWatcher is licensed under the MIT license.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.