Recent

Author Topic: dirwatch example program  (Read 2939 times)

pernel

  • Newbie
  • Posts: 2
dirwatch example program
« on: September 15, 2018, 09:28:20 am »
Hi I need a method to monitor changes in a linux server directory and tried an examlple program from
https://www.freepascal.org/~michael/articles/#dirwatch.
When building I get warnings about deprecated symbols "mtime nsec", "size","mode", "uid", "gid".
When first time running i get a "Debugger Exception Notification" with text Project dirwatch raised exception class 'EConvertError' with message: 16:50:4.43103 is not a valid time specification.
If I break I'm taken into SYSUTILS_ENCODETIME.
If I select continue I get error message 16:50:4.43103. If I press OK and select a directory to watch the watching window is opened but without an indication of what directory I selected. When adding some file to the supposedly watches directory nothing happens.
When selecting "portable mode" and a directory the app starts working and notifies about changes.
I very much would appreciate any help make  the app to work under linux so I can develop it to my specifical needs.
I'm on Lazarus IDE v1.2.4 and Mageia linux

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: dirwatch example program
« Reply #1 on: September 15, 2018, 01:08:22 pm »
It may be time to upgrade.
We're currently at Lazarus 1.8.4 / fpc 3.0.4....

Bart

pernel

  • Newbie
  • Posts: 2
Re: dirwatch example program
« Reply #2 on: September 15, 2018, 02:20:01 pm »
Sorry, but my distro Mageia 6 offers only this version of Lazarus and fpc version 2.6.4. I think the example program was written prior to my versions of Lazarus and fpc.....

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: dirwatch example program
« Reply #3 on: September 15, 2018, 02:32:50 pm »
When building I get warnings about deprecated symbols "mtime nsec", "size","mode", "uid", "gid".

These are probably leftovers of 1.0.x deprecated functionality. They were deprecated earlier (2003-2005 timeframe), but only later versions allowed to generate a warning.

With 3.2 and trunk they are finally removed

 

TinyPortal © 2005-2018