[Lazarus] Getting the last modified date of a directory

Richard Mace richard.mace at gmail.com
Tue Oct 28 07:38:59 CET 2014


On 27 October 2014 18:57, Mark Morgan Lloyd <markMLl.lazarus at telemetry.co.uk
> wrote:

> Rik van Kekem wrote:
>
>> Maybe it's just me but what's the use of "Date modified" for a folder?
>> It *does not* (like TS expects) reflect the date of the last file
>> *changed* in the folder. Only when files are removed or added the "Date
>> modified" of the folder changes. If you also want the time of the last
>> changes in the folder you would need to loop through all the files.
>>
>
> That of course is a good point, but if [whoever asked the question] was
> writing an archiver or a file transfer program then his users would assume
> that it should (i.e. would be reasonably expected to, irrespective of
> documentation etc.) preserve all the POSIX timestamps, even if their
> meaning was counter-intuitive.


​Thanks for all of everyones input regarding this. It looks like the
solution that I am going to have to use is to scan all of the files within
the folder and work out new latest modified file from that.

Thanks again

Richard​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20141028/eb5a2f1f/attachment-0003.html>


More information about the Lazarus mailing list