Ticket #5153: test_space.cpp
File test_space.cpp, 493 bytes (added by , 12 years ago) |
---|
Line | |
---|---|
1 | #include <iostream> |
2 | #include <boost/filesystem.hpp> |
3 | |
4 | using namespace std; |
5 | using namespace boost::filesystem; |
6 | |
7 | int main() |
8 | { |
9 | space_info vSpaceInfo = space(current_path()); |
10 | |
11 | cout |
12 | << "File system information: " << current_path().native() << endl |
13 | << endl |
14 | << " capacity = " << setw(18) << vSpaceInfo.capacity << endl |
15 | << " free = " << setw(18) << vSpaceInfo.free << endl |
16 | << " available = " << setw(18) << vSpaceInfo.available << endl |
17 | << endl; |
18 | |
19 | return 0; |
20 | } |