Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Widgetset
»
Cocoa
»
How to monitor a folder for changes
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Application startup from ...
by
trev
[
Today
at 01:06:54 am]
TFPHTTPClient holds the l...
by
trev
[
Today
at 12:59:08 am]
FileExists() behaviour ch...
by
Kays
[
Today
at 12:49:37 am]
TWindowButton — immitatio...
by
furious programming
[
Today
at 12:44:32 am]
Modern For Loop question
by
Kays
[
Today
at 12:26:16 am]
How to show a Label in a ...
by
Superdisk
[
Today
at 12:22:43 am]
While loop and two-dimens...
by
speter
[January 25, 2021, 11:51:03 pm]
Now is the time to promot...
by
ASBzone
[January 25, 2021, 11:44:09 pm]
Strange filenames .....
by
ASBzone
[January 25, 2021, 11:21:57 pm]
FindAllFiles works for fo...
by
ASBzone
[January 25, 2021, 11:15:16 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to monitor a folder for changes (Read 498 times)
Igor Kokarev
Sr. Member
Posts: 304
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?
Logged
MarkMLl
Hero Member
Posts: 1810
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
Logged
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
trev
Global Moderator
Hero Member
Posts: 1220
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
Logged
o Lazarus 2.1 r64368 FPC 3.3.1 r48100 macOS 10.14.6 Xcode 11.3.1
o Lazarus 2.1 r64392 3.3.1 Jan 13 21:24 macOS 11.1 aarch64 Xcode 12.3
o Lazarus 2.1 r61574 3.3.1 r42318 FreeBSD 12.1 amd64 VMware VM
o Lazarus 2.1 r61574 3.0.4 Ubuntu 20.04 Parallels VM
o Lazarus 2.0.10 3.2.0 Win10 Parallels VM
Igor Kokarev
Sr. Member
Posts: 304
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.
Logged
Alextp
Hero Member
Posts: 1178
Re: How to monitor a folder for changes
«
Reply #4 on:
October 23, 2020, 02:01:45 pm »
DirectoryWatcher
https://forum.lazarus.freepascal.org/index.php/topic,37415.0.html
Logged
CudaText editor
-
ATSynEdit
-
More from me
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Widgetset
»
Cocoa
»
How to monitor a folder for changes
TinyPortal
© 2005-2018