[Lazarus] Getting the last modified date of a directory

Jürgen Hestermann juergen.hestermann at gmx.de
Mon Oct 27 18:36:34 CET 2014


Am 2014-10-26 um 11:56 schrieb Reinier Olislagers:
 > On 26/10/2014 11:45, Jürgen Hestermann wrote:
 >> Am 2014-10-26 um 10:29 schrieb Reinier Olislagers:
 >>> On 26/10/2014 10:09, Jürgen Hestermann wrote:
 >>>> I think that "FileAge" should work for directory names too.
 >>> Why do you think that?
 >>> The docs say it doesn't:
 >>> http://www.freepascal.org/docs-html/rtl/sysutils/fileage.html
 >> At least on Windows there is no difference
 >> to retrieve the date of a file or a directory:
 > Why are you quoting MSDN WinAPI help instead of FreePascal keyword help?

I had a brief look at the code and thought that it would simply hand over the file (directory) name to the API function.
In this case it would work the same for files and directories (at least on windows).
But I can be wrong.


 > The FPC docs clearly state the return value is -1 in case of
 > directories. Have you tested it?

No, I haven't tested it. Did you test it?
What is your answer to the original question?
How to get the date of a directory entry?





More information about the Lazarus mailing list