Lazarus

Programming => Widgetset => Cocoa => Topic started by: Igor Kokarev on October 22, 2020, 02:52:34 pm

Title: How to monitor a folder for changes
Post by: Igor Kokarev on October 22, 2020, 02:52:34 pm
Hi,

How to monitor a folder for changes (new/modified files/folders) with Cocoa in macOS? Is there any examples on FPC?
Title: Re: How to monitor a folder for changes
Post by: MarkMLl on October 22, 2020, 02:57:52 pm
I've done it on linux but I don't know whether the same API is applicable to Macs.

MarkMLl
Title: Re: How to monitor a folder for changes
Post by: trev on October 23, 2020, 01:48:52 am
See File System Events (https://developer.apple.com/documentation/coreservices/file_system_events) and packages/univint/src/FSEvents.pas
Title: Re: How to monitor a folder for changes
Post by: Igor Kokarev on October 23, 2020, 01:37:13 pm
trev,
Mark,

Many thanks for your replies!

I'll learn FSEvents now.
Title: Re: How to monitor a folder for changes
Post by: Alextp on October 23, 2020, 02:01:45 pm
DirectoryWatcher
https://forum.lazarus.freepascal.org/index.php/topic,37415.0.html
TinyPortal © 2005-2018