FileAgeCached function
Gets the file age for the specified file or directory.
Declaration
function FileAgeCached(const AFileName: string): Int64Description
FileAgeCached is an Int64 function used to get file age for the file specified file name. The return is derived from one of three mechanisms:
- The OnFileAgeCached event handler for the unit (when assigned). This allows the routine to be used for symbolic directory names (like '.' or '..') or virtual file names in the IDE.
- The FileStateCache maintained in the unit (when assigned).
- Or, the UniversalFileAgeUTF8 routine from the
LazFileUtils.pasunit in theLazUtilspackage. This routine returns the value from theSysUtils.FileAgeroutine in theRTL. This the default mechanism used if the other two are not assigned.
This routine is used primarily in the Lazarus IDE and its build manager.
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
