/ Published in: Delphi
Expand |
Embed | Plain Text
function GetFileSize(const filename: string): Int64; var f: TWin32FindData; h: THandle; begin result := -1; try if not FileExists(filename) then exit; h := FindFirstFile(PChar(filename), f); if h = INVALID_HANDLE_VALUE then RaiseLastWin32Error; try Result := f.nFileSizeHigh shl 32 + f.nFileSizeLow; finally windows.FindClose(h); end; except end; end;
You need to login to post a comment.
