Reputation: 10828
is there a way to detect the file system size limitations of individual files (e.g. 4gb on fat 32)?
It must work on Windows OS, but better would be a portable solution. Detecting the file system type could be a work around, but I don't know how you can do that either.
Can anybody help me out here?
Thank you in advance Tobias
Upvotes: 5
Views: 399
Reputation: 17268
You can obtain the total capacity limitations through boost::space()
, or directly use POSIX fstatvs()
.
As for limitations on the size of individual files... the only portable answer that springs to mind is ugly brute force try-to-create-larger-and-larger-files-until-failure, expensive as it is (and impossible if capacity is already limited).
Upvotes: 0
Reputation: 101746
You can detect the filesystem type on Windows with GetVolumeInformation
Upvotes: 3