All Projects → Wosi → DirectoryWatcher

Wosi / DirectoryWatcher

Licence: other
Watch changes in directories

Programming Languages

pascal
1382 projects

Projects that are alternatives of or similar to DirectoryWatcher

brook-telegram
Telegram plugin for brookframework
Stars: ✭ 23 (-67.14%)
Mutual labels:  freepascal
Axes-Armour-Ale
A fantasy, ASCII dungeon crawler for Windows, Linux & OSX
Stars: ✭ 22 (-68.57%)
Mutual labels:  freepascal
Ascension
A metaheuristic optimization framework
Stars: ✭ 24 (-65.71%)
Mutual labels:  freepascal
fswatch
File/Directory Watcher for Modern C++
Stars: ✭ 56 (-20%)
Mutual labels:  inotify
gevent inotifyx
gevent compatibility for inotifyx
Stars: ✭ 22 (-68.57%)
Mutual labels:  inotify
DfmExtractor
Small command line utility which allows you to extract DFM, LFM and FRM forms from executable files compiled by Delphi, Lazarus and CodeTyphon.
Stars: ✭ 22 (-68.57%)
Mutual labels:  freepascal
GLPT
GLPT :: OpenGL Pascal Toolkit. A multi-platform library for OpenGL and OpenGL ES
Stars: ✭ 26 (-62.86%)
Mutual labels:  freepascal
fp-telegram
Wrapper classes library for telegram bots API (FreePascal)
Stars: ✭ 59 (-15.71%)
Mutual labels:  freepascal
VALIS
Vote ALlocating Immune System, an immune-inspired classification algorithm
Stars: ✭ 21 (-70%)
Mutual labels:  freepascal
JPLib
A small library of Pascal units needed to compile my projects published on GitHub.
Stars: ✭ 41 (-41.43%)
Mutual labels:  freepascal
watcherd
A shell daemon that will listen for directory changes and execute custom commands for each event.
Stars: ✭ 48 (-31.43%)
Mutual labels:  inotify
Mad-Pascal
Mad Pascal Compiler for 6502 (Atari XE/XL, C64, C4Plus)
Stars: ✭ 46 (-34.29%)
Mutual labels:  freepascal
lazarus
Notepas sources and other derived lazarus projects using the editor module.
Stars: ✭ 26 (-62.86%)
Mutual labels:  freepascal
inotify-rs
Idiomatic inotify wrapper for the Rust programming language
Stars: ✭ 219 (+212.86%)
Mutual labels:  inotify
PospoliteView
Pospolite View aims to be a simple HTML viewer engine fully made in Free Pascal.
Stars: ✭ 29 (-58.57%)
Mutual labels:  freepascal
daraja-restful
RESTful extension for Daraja HTTP Framework
Stars: ✭ 23 (-67.14%)
Mutual labels:  freepascal
dokan-delphi
Dokan Delphi Wrapper
Stars: ✭ 48 (-31.43%)
Mutual labels:  freepascal
sizectrl
TSizeCtrl v8.2
Stars: ✭ 16 (-77.14%)
Mutual labels:  freepascal
sftp-gateway
This repository contains a docker image configured to use the SSH File Transfer Protocol (SFTP) to transfer all its files to Cloud Blob Storage Services. This image can be deployed on a Kubernetes cluster with Helm.
Stars: ✭ 18 (-74.29%)
Mutual labels:  inotify
xavier
Xavier is a small object-oriented XML library for Lazarus and Delphi
Stars: ✭ 38 (-45.71%)
Mutual labels:  freepascal

DirectoryWatcher

Watch changes in directories on different platforms.

This is an abstraction layer for

  • ReadDirectoryChangesW on Windows
  • FSEvent on Mac OS
  • inotify on Linux

How to use

// Create new DirectoryWatcher
DirectoryWatcher := TDirectoryWatcherBuilder
                    .New
                    .WatchDirectory(FolderToWatch)
                    .Recursively(True)
                    .OnChangeTrigger(OnFileEvent)
                    .Build;

// Start watching in different thread
DirectoryWatcher.Start;

// Stop DirectoryWatcher
DirectoryWatcher := Nil;

// ...

procedure TDirectoryWatcherDemo.OnFileEvent(const FilePath: String; 
                                            const EventType: TDirectoryEventType);
var
  EventTypeString: String;
begin
  WriteLn('======NEW EVENT======');
  WriteLn('File: ' + FilePath);

  case EventType of
    detAdded: EventTypeString := 'ADDED';
    detRemoved: EventTypeString := 'REMOVED';
    detModified: EventTypeString := 'MODIFIED';
  end;

  WriteLn('Type: ' + EventTypeString);
end;  
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].