Re: [fpc-pascal] Getting size of file without opening it?

2020-07-23 Thread Michael Van Canneyt
On Fri, 24 Jul 2020, Bo Berglund via fpc-pascal wrote: I am using FindAllFiles in order to list the files in a directory and it works fine. But I also need the size and timestamp of the file so I searched the net for it. What I found was: var T: TDateTime; T := FileDateTodateTime(FileAge(fi

[fpc-pascal] Getting size of file without opening it?

2020-07-23 Thread Bo Berglund via fpc-pascal
I am using FindAllFiles in order to list the files in a directory and it works fine. But I also need the size and timestamp of the file so I searched the net for it. What I found was: var T: TDateTime; T := FileDateTodateTime(FileAge(filename)); But FileSize() needs a file argument to an open f