Go to the documentation of this file.
13 using namespace wibble::sys::fs;
27 assert(files.find(
".") != files.end());
28 assert(files.find(
"..") != files.end());
29 assert(files.find(
"etc") != files.end());
30 assert(files.find(
"bin") != files.end());
31 assert(files.find(
"tmp") != files.end());
38 assert(files.find(
".") != files.end());
39 assert(files.find(
"..") != files.end());
40 assert(files.find(
"etc") != files.end());
41 assert(files.find(
"bin") != files.end());
42 assert(files.find(
"tmp") != files.end());
87 Directory dir1(
"/antaniblindalasupercazzola123456");
121 system(
"rm -rf test-mkpath");
122 mkpath(
"test-mkpath/test-mkpath");
125 system(
"rm -rf test-mkpath");
132 system(
"rm -rf test-mkpath");
137 system(
"rm -rf test-mkpath");
144 system(
"rm -rf test-mkpath");
153 system(
"rm -rf test-mkpath; touch test-mkpath");
158 assert(
string(e.
what()).find(
"exists but it is not a directory") != string::npos);
164 system(
"rm -rf test-mkpath; ln -s ./tmp/tmp/tmp/DOESNOTEXISTS test-mkpath");
169 assert(
string(e.
what()).find(
"looks like a dangling symlink") != string::npos);
176 system(
"rm -f does-not-exist");
178 system(
"touch does-exist");
185 system(
"rm -rf testdir");
187 system(
"touch testdir");
189 system(
"rm testdir; mkdir testdir");
195 using namespace wibble::sys;
198 string test1 =
readFile(
"testfile");
204 using namespace wibble::sys;
205 system(
"rm -f testfile");