Как мне это сделать через Delphi/API???
procedure TForm1.Button1Click(Sender: TObject); var FileHandle : THandle;LocalFileTime : TFileTime;DosFileTime : DWORD;LastAccessedTime : TDateTime;FindData : TWin32FindData;begin FileHandle := FindFirstFile('AnyFile.FIL', FindData);if FileHandle <> INVALID_HANDLE_VALUE thenbeginWindows.FindClose(Handle);if (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = 0 thenbeginFileTimeToLocalFileTime(FindData.ftLastWriteTime, LocalFileTime);FileTimeToDosDateTime(LocalFileTime,LongRec(DosFileTime).Hi,LongRec(DosFileTime).Lo);LastAccessedTime := FileDateToDateTime(DosFileTime);Label1.Caption := DateTimeToStr(LastAccessedTime);end;end;end; |