13 #include <boost/filesystem.hpp>
32 static bool createAllDirectories(
const std::string& dirPath);
43 static std::string absolutePath(
const std::string& path);
64 static std::string cleanPath(
const std::string& path);
82 static bool isAbsolutePath(
const std::string& path);
88 static bool exists(
const std::string& path);
94 static bool exists(
const boost::filesystem::path& path);
104 static bool equivalent(
const std::string& path1,
const std::string& path2);
122 static std::string makeRelative(
const std::string& root,
const std::string& path);
131 static std::string setExtension(std::string file, std::string ext);
141 static std::string addExtension(std::string file, std::string ext);
150 static std::string extension(
const std::string& file,
bool withDot=
false);
159 static std::string extensionCaseSensitive(std::string file,
bool withDot=
false);
166 static std::string baseName(
const std::string& file);
174 static std::string directoryOfFile(
const std::string& file);
182 static std::string directoryOfPath(
const std::string& file);
190 static std::string rootDirectoryOfPath(
const std::string& file);
196 static std::string nativePath(
const std::string& path);
208 static bool is_directory(
const std::string& path);
214 static bool is_directory(
const boost::filesystem::path& path);
220 static bool deleteFile(
const std::string& file);
230 template <
typename PathCollection>
231 static bool findFile(
const std::string& filePathIn,
232 const PathCollection& paths, std::string& actualFilePathOut)
237 actualFilePathOut = filePathIn;
242 typename PathCollection::const_iterator i = paths.begin();
243 typename PathCollection::const_iterator e = paths.end();
246 if(findFileInPath(filePathIn, *i, actualFilePathOut))
264 static bool findFileInPath(
const std::string& filePathIn,
265 const std::string& path, std::string& actualFilePathOut);