filetime and filedate in directory
Posted: Wed Aug 10, 2022 1:08 am
Hi,
I have some little problem, need updated filetime and filedate of some file in directory.
functions filetime() and filedate() return still some time and date when program running, but I need info about access time
when other users write to this file.
This looks to fact, that when program is running, still see directory without changes in real time.
Test program attached.
Note : I need some system to control external programs called with Runshell. I am working on system which do this :
main program call external program with runshell
when external program start , create temporary file to hdd and write to it some row for example date and time of start process
every x seconds also fopen and fclose this file to "tell" main program, that, external process still running
when process pass, this temporary file will delete or write some row for example stop at date and time
main program waiting to end of external program, and every x seconds test if temporary file exist, when no, this looks external process is ended, when exist also look to last access date and time, and when this is more than some limit, for example 30 seconds, this looks, that external process have some problem, frozen, or crashed.
But when I can not determine real access time, this not work.
Maybe I have some wrong in my test program, but this looks to not refreshing Directory() structure when XPP program running. When close and open, date and time load correct.
Thanks for all advices
I have some little problem, need updated filetime and filedate of some file in directory.
functions filetime() and filedate() return still some time and date when program running, but I need info about access time
when other users write to this file.
This looks to fact, that when program is running, still see directory without changes in real time.
Test program attached.
Note : I need some system to control external programs called with Runshell. I am working on system which do this :
main program call external program with runshell
when external program start , create temporary file to hdd and write to it some row for example date and time of start process
every x seconds also fopen and fclose this file to "tell" main program, that, external process still running
when process pass, this temporary file will delete or write some row for example stop at date and time
main program waiting to end of external program, and every x seconds test if temporary file exist, when no, this looks external process is ended, when exist also look to last access date and time, and when this is more than some limit, for example 30 seconds, this looks, that external process have some problem, frozen, or crashed.
But when I can not determine real access time, this not work.
Maybe I have some wrong in my test program, but this looks to not refreshing Directory() structure when XPP program running. When close and open, date and time load correct.
Thanks for all advices