1 #ifndef WIBBLE_SYS_DIRECTORY_H
2 #define WIBBLE_SYS_DIRECTORY_H
22 std::auto_ptr<struct stat>
stat(
const std::string& pathname);
28 void stat(
const std::string& pathname,
struct stat& st);
31 bool access(
const std::string& s,
int m);
34 bool exists(
const std::string& s);
39 std::string
abspath(
const std::string& pathname);
42 std::string
mkdtemp( std::string templ );
51 void mkpath(
const std::string& dir);
58 std::string
readFile(
const std::string &file);
67 std::string
readFile(std::istream& file,
const std::string& filename);
70 void writeFile(
const std::string &file,
const std::string &data);
97 void renameIfExists(
const std::string& src,
const std::string& dst);
100 void unlink(
const std::string& fname);
106 void rmtree(
const std::string& dir);
113 bool isdir(
const std::string& pathname);
116 bool isblk(
const std::string& pathname);
119 bool ischr(
const std::string& pathname);
122 bool isfifo(
const std::string& pathname);
125 bool islnk(
const std::string& pathname);
128 bool isreg(
const std::string& pathname);
131 bool issock(
const std::string& pathname);
134 time_t
timestamp(
const std::string& file);
137 time_t
timestamp(
const std::string& file, time_t def);
140 size_t size(
const std::string& file);
143 size_t size(
const std::string& file,
size_t def);
146 ino_t
inode(
const std::string& file);
149 ino_t
inode(
const std::string& file, ino_t def);
167 struct dirent* direntbuf;
222 const_iterator
begin()
const;
225 const_iterator
end()
const;