The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



SetFileDates


Unit: SDL_filesys
Class: none
Declaration: function SetFileDates (FName: string; CreationDate, LastAccessDate, LastWriteDate: TDateTime): integer;

The function SetFileDates sets the file dates of the file FName to the dates specified in the parameters CreationDate, LastAccessDate and LastWriteDate. If you want to change only a particular date entry you have to set the other dates to zero values.

Please note that the LastWriteDate parameter corresponds to the "Modified" time in the Windows file properties dialog, the LastAccessDate corresponds to the "Accessed" time.

The function returns the following error codes:

 0 ... everything is OK
-1 ... cannot access the specified file (for various reasons)

Hint: The function SetFileDates is only available for the compilers Rad Studio 10.2 Tokyo, or higher.



Last Update: 2020-Aug-20