30 #ifndef CORE_UTIL_DIR_H
31 #define CORE_UTIL_DIR_H
42 #define S_IRUSR 0x0100
43 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
44 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
79 Dir(
const std::string&);
81 Dir& operator=(
const Dir&);
83 static Dir create(
const std::string&
name);
84 static Dir current_directory();
86 void remove(
bool throwOnError =
true);
89 void forceRemove(
bool throwOnError =
true);
92 void remove(
const std::string& filename,
bool throwOnError =
true);
95 void copy(
Dir& destDir);
96 void move(
Dir& destDir);
99 void copy(
const std::string& filename,
Dir& destDir);
100 void move(
const std::string& filename,
Dir& destDir);
102 Dir createSubdir(
const std::string& name);
103 Dir getSubdir(
const std::string& name);
107 void getFilenamesBySuffix(
const std::string& suffix,
108 std::vector<std::string>& filenames);
115 static bool removeDir(
const char * dirName );
126 # define MKDIR(dir, perm) mkdir(dir)
128 # define LSTAT(file, buf) stat(file, buf)
131 # define MKDIR(dir, perm) mkdir(dir, perm)
132 # define LSTAT(file, buf) lstat(file, buf)
#define SCISHARE
Definition: share.h:39
std::string getName() const
Definition: Dir.h:110
const char * name[]
Definition: BoostGraphExampleTests.cc:87