Recent

Author Topic: How to monitor a folder for changes  (Read 1618 times)

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
How to monitor a folder for changes
« 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?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: How to monitor a folder for changes
« Reply #1 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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: How to monitor a folder for changes
« Reply #2 on: October 23, 2020, 01:48:52 am »
See File System Events and packages/univint/src/FSEvents.pas

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: How to monitor a folder for changes
« Reply #3 on: October 23, 2020, 01:37:13 pm »
trev,
Mark,

Many thanks for your replies!

I'll learn FSEvents now.

AlexTP

  • Hero Member
  • *****
  • Posts: 2384
    • UVviewsoft

 

TinyPortal © 2005-2018