12 #include <boost/filesystem.hpp>
31 static bool createAllDirectories(
const std::string& dirPath);
42 static std::string absolutePath(
const std::string& path);
63 static std::string cleanPath(
const std::string& path);
81 static bool isAbsolutePath(
const std::string& path);
87 static bool exists(
const std::string& path);
93 static bool exists(
const boost::filesystem::path& path);
103 static bool equivalent(
const std::string& path1,
const std::string& path2);
121 static std::string makeRelative(
const std::string& root,
const std::string& path);
130 static std::string setExtension(std::string file, std::string ext);
140 static std::string addExtension(std::string file, std::string ext);
149 static std::string extension(
const std::string& file,
bool withDot=
false);
158 static std::string extensionCaseSensitive(std::string file,
bool withDot=
false);
165 static std::string baseName(
const std::string& file);
173 static std::string directoryOfFile(
const std::string& file);
181 static std::string directoryOfPath(
const std::string& file);
189 static std::string rootDirectoryOfPath(
const std::string& file);
195 static std::string nativePath(
const std::string& path);
207 static bool is_directory(
const std::string& path);
213 static bool is_directory(
const boost::filesystem::path& path);
219 static bool deleteFile(
const std::string& file);
229 template <
typename PathCollection>
230 static bool findFile(
const std::string& filePathIn,
231 const PathCollection& paths, std::string& actualFilePathOut)
236 actualFilePathOut = filePathIn;
241 typename PathCollection::const_iterator i = paths.begin();
242 typename PathCollection::const_iterator e = paths.end();
245 if(findFileInPath(filePathIn, *i, actualFilePathOut))
263 static bool findFileInPath(
const std::string& filePathIn,
264 const std::string& path, std::string& actualFilePathOut);