[fpc-devel] Determin file size - how?

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Thu Dec 15 14:40:49 CET 2011

On Thu, 15 Dec 2011, Hans-Peter Diettrich wrote:

> michael.vancanneyt at wisa.be schrieb:
>>> Normally I use TFileStream's, which have a Size property. But I find it 
>>> nasty to open an file, when I only want to know its size. FPC (like 
>>> Delphi) lacks some basic file/directory handling functions (Size, Remove, 
>>> Rename...), at
>> I think you didn't look very well in the docs.
>> DeleteFile
>> RenameFile
> After I couldn't find it in the FPC docs, I looked into the D7 docs, where 
> many more functions are listed in "File management routines".
> I understand that FPC has to implement some functions with the Delphi names, 
> but when most other file related functions start with "File", how should a 
> user know (and search for) names *ending* with "File" :-(

I repeat: you didn't search very well.


They have the same names as their Delphi counterparts.

>> I agree the filesize is missing.
>> I will look into adding them to the documentation topics.
> Thanks :-)
> IMO a separation into topics "File handling" (FILE based) and "File 
> management" (by filename) would be a good idea. Now I also found an topic 
> "General File handling routines", but it seems to list only Posix functions, 
> not avaialble on other platforms - should read "Posix File ..." instead?

Where did you find this topic ?

I will investigate what can be done to make the topics more clear and

> As already mentioned, I still miss platform independent versions of the file 
> management routines. Lazarus implements some routines, but IMO these should 
> become part of the RTL, not of FCL or LCL.

Which ones do you think are missing apart from FileSize ?


More information about the fpc-devel mailing list