C++ how to find file version

Started by
2 comments, last by benryves 15 years, 2 months ago
Hi all. Im not sure if this is a beginner topic but this forum seemed most appropriate. How would you go about finding the file version and/or file size of a random access file? ( I mean during runtime) Language: C++ Thanks in advance. Nick
Advertisement
Which file version do you mean exactly? Generally, files don't carry version information at the level of file systems. But of course, specific file formats could do that (consider e.g. a text file, with the first line saying "Interpreter.Version = 0.3" or something like that). There are versioning file systems, but this isn't reliable information for your program (except you are writing some low level piece of software, that is targetted at ext3fs, for example; or some other specific file system).
I mean like the file attribute(windows) like u can have version 4.2.7563.2432... If this isnt possible is there a way I can read the file size?
For Windows, take a look at the Version Information documentation.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

This topic is closed to new replies.

Advertisement