FileSetDate does not work on directories
Original Reporter info from Mantis: Paul
-
Reporter name: Paul
Original Reporter info from Mantis: Paul
- Reporter name: Paul
Description:
On Windows XP it is not possible to change the modification time of a directory using function "SysUtils.FileSetDate" (on OS X 10.7 this is possible). Error "access denied" occurs.
Regards,
Paul
Steps to reproduce:
Please see uploaded Lazarus project. In general the following steps have to be applied on an existing directory:
Result := SysUtils.FileSetDate('C:\Temp', 0);
if Result <> 0 then begin
ShowMessage('Error: ' + IntToStr(Result) + ' = ' + SysUtils.SysErrorMessage(Result));
end else begin
ShowMessage('OK.');
end;