Recent

Author Topic: Folder Monitoring?  (Read 6016 times)

jscoulter

  • Newbie
  • Posts: 1
Folder Monitoring?
« on: May 06, 2007, 01:36:07 pm »
Hi All. FINALLY go Lazarus to work under Linux. Not realy a linux person, so that didnt help :-)

Anyway, I have a need to write an app. that will monitor a folder and tell me if the folder has changed, i.e. a files date/time has changed etc.

I have a control in Dephi that I have used many times, and wondered if there was a similar type of control around for Lazurus that would do the same, OR if someone was able to tell me a away to do it?
I guess I could look at he folder every x seconds and check the files date and time, but not sure this really is the BEST way.

Thanks, Jeremy

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
RE: Folder Monitoring?
« Reply #1 on: May 06, 2007, 03:19:30 pm »
http://aplawrence.com/Unixart/watchdir.html

STAT seems quite easy or interface with FAM (don't know if header translation is done for FPC)

For stat see also: http://freepascal.org/docs-html/rtl/baseunix/fpstat.html

 

TinyPortal © 2005-2018