看看Delphi的源代码吧。(示例如何使用Pipi.介绍的函数)<br><br>function FileAge(const FileName: string): Integer;<br>var<br> Handle: THandle;<br> FindData: TWin32FindData;<br> LocalFileTime: TFileTime;<br>begin<br> Handle := FindFirstFile(PChar(FileName), FindData);<br> if Handle <> INVALID_HANDLE_VALUE then<br> begin<br> Windows.FindClose(Handle);<br> if (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = 0 then<br> begin<br> FileTimeToLocalFileTime(FindData.ftLastWriteTime, LocalFileTime);<br> if FileTimeToDosDateTime(LocalFileTime, LongRec(Result).Hi,<br> LongRec(Result).Lo) then Exit;<br> end;<br> end;<br> Result := -1;<br>end;<br>