FileLen design and implementation bug - is there an alternative?

Hi,

there is a design bug in the FileLen function (probably because it’s old):

The returned length is a signed long, so it wraps at files > 2GB.

The funny thing is, that it generates a File not found error on big files on Linux.

On Linux I could run ls -l and parse the result; on Windows there are kernel calls.

But all this is clumsy.

Has someone an idea how to get the real size of big files in an elegant way ?

Greetings

Thomas