TSearchRec contains a Size field so you can use FindFirst with the specific filename instead of a pattern (don't forget FindClose then ;) ) to have a cross platform solution.
Otherwise you'd need to use system specific mechanisms (e.g. GetFileAttributeEx on Windows, stat on *nix).
Am 07.10.2017 21:08 schrieb "Paul Nance" <[hidden email]>:
> I've always (since Turbo Pascal and now with Free Pascal) used FILESIZE. It works like a charm.
> Even if you do it in assembly its done the same as its done in pascal.
FileSize() has the disadvantage that you need to open the file. But what if you don't have permissions for that? Permissions to retrieve the file size when the file is closed are usually available on the other hand, but for this another mechanism must be used.