Forum > macOS / Mac OS X

TFileTime not run in MAc OS

(1/1)

laguna:
This function change date time on file.
Run in Windows but not run in Mac OS
This is message: syncthread.pas(213,15) Error: Identifier not found "TFileTime"

help me thanks



--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  procedure myFileSetDateTime(const FileName: string; DateTime: TDateTime);  var    FileHandle: THandle;    FileTime: TFileTime;    SystemTime: TSystemTime;  begin    FileHandle := FileOpen(FileName, fmOpenWrite or fmShareDenyNone);    if FileHandle <> THandle(-1) then    begin      try        DateTimeToSystemTime(DateTime, SystemTime);        SystemTimeToFileTime(SystemTime, FileTime);        SetFileTime(FileHandle, @FileTime, @FileTime, @FileTime);      finally        FileClose(FileHandle);      end;    end    else    begin      // Gestisci l'errore se non รจ possibile aprire il file      raise Exception.Create('Impossibile aprire il file: ' + FileName);    end;  end;  

Navigation

[0] Message Index

Go to full version