1 #ifndef WIBBLE_SYS_DIRECTORY_H
2 #define WIBBLE_SYS_DIRECTORY_H
21 std::auto_ptr<struct stat>
stat(
const std::string& pathname);
24 bool access(
const std::string& s,
int m);
27 bool exists(
const std::string& s);
32 std::string
abspath(
const std::string& pathname);
41 void mkpath(
const std::string& dir);
48 std::string
readFile(
const std::string &file);
51 void writeFile(
const std::string &file,
const std::string &data);
61 void renameIfExists(
const std::string& src,
const std::string& dst);
64 void unlink(
const std::string& fname);
70 void rmtree(
const std::string& dir);
77 bool isdir(
const std::string& pathname);
80 bool isDirectory(
const std::string& pathname) __attribute__ ((deprecated));
113 if (&i ==
this)
return *
this;
114 if (dir) closedir(dir);
125 if ((d = readdir(dir)) == 0)
139 return dir == iter.dir && d == iter.d;
143 return dir != iter.dir || d != iter.d;
150 const std::string&
path()
const {
return m_path; }
156 const_iterator
begin();
159 const_iterator
end()
const;
162 bool isdir(
const const_iterator& i)
const;