Hi All
Is there an easy way to get information about a file, like size, modification date, permissions, etc ?
Thnx in advance
LuCa
Hi All
Is there an easy way to get information about a file, like size, modification date, permissions, etc ?
Thnx in advance
LuCa
You're stuck doing it one of two ways:
1) O/S specific way.
2) Faking it by calling other programs that does it.
For an example for #2, you could call system("dir >> dump.log") for Windows. You would then open and read through dump.log and parse the info to get what you want. It's not the best way of doing it, and it's limited.
File size can be determined simply by opening the file and moving to the end of the file.
For O/S specific methods, it obviously depends upon what your O/S is.
In my case I'm using Linux and Unix.
Any suggestion about documentation for these kind of things would be very useful!!
LuCa
> Any suggestion about documentation for these kind of things would be very useful!!
opendir() readdir() closedir() and stat()
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
thnx a lot, that will get me started!!!