12 #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);
88 static bool getFilePathsWithExtension(
const std::string& rootDir,
89 const std::string& ext, std::vector<std::string>& ret);
103 static bool getFilePathsWithExtension(
const std::vector<std::string>& fileOrDirVec,
104 const std::string& ext, std::vector<std::string>& ret);
114 static bool getFilePathsInDir(
const std::string& rootDir,
115 std::vector<std::string>& ret);
123 static bool dirExistsNotEmpty(
const std::string& rootDir);
131 static bool isAbsolutePath(
const std::string& path);
137 static bool exists(
const std::string& path);
141 static std::string fileName(
const std::string& path);
147 static bool exists(
const boost::filesystem::path& path);
157 static bool equivalent(
const std::string& path1,
const std::string& path2);
175 static std::string makeRelative(
const std::string& root,
const std::string& path);
184 static std::string setExtension(std::string file, std::string ext);
194 static std::string addExtension(std::string file, std::string ext);
203 static std::string extension(
const std::string& file,
bool withDot=
false);
212 static std::string extensionCaseSensitive(std::string file,
bool withDot=
false);
219 static std::string baseName(
const std::string& file);
227 static std::string directoryOfFile(
const std::string& file);
235 static std::string directoryOfPath(
const std::string& file);
243 static std::string rootDirectoryOfPath(
const std::string& file);
249 static std::string nativePath(
const std::string& path);
268 static std::string canonicalPath(
const std::string& path );
276 static bool is_directory(
const std::string& path);
282 static bool is_directory(
const boost::filesystem::path& path);
288 static bool deleteFile(
const std::string& file);
294 static bool deleteDirectory(
const std::string& dir);
300 static bool deleteDirectoryContents(
const boost::filesystem::path& dir);
307 static bool deleteDirectoryContentsWithIgnoreFilter(
const boost::filesystem::path& dir,
const std::set<std::string>& ignoreFilter);
317 template <
typename PathCollection>
318 static bool findFile(
const std::string& filePathIn,
319 const PathCollection& paths, std::string& actualFilePathOut)
324 actualFilePathOut = filePathIn;
329 typename PathCollection::const_iterator i = paths.begin();
330 typename PathCollection::const_iterator e = paths.end();
333 if(findFileInPath(filePathIn, *i, actualFilePathOut))
351 static bool findFileInPath(
const std::string& filePathIn,
352 const std::string& path, std::string& actualFilePathOut);
355 static unsigned int makeAndXorHash(
const std::string& filePath);
358 static size_t ts_fileSize(
const std::string& strFileName);
361 static bool ts_fileExists(
const std::string& strFileName);
365 static void ts_readFileIntoBuffer(
const std::string& strFileName,
unsigned char*& pData,
size_t&
size);
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
voidpf void uLong size
Definition: ioapi.h:39
static bool findFile(const std::string &filePathIn, const PathCollection &paths, std::string &actualFilePathOut)
Find a file in a list of paths. Iterate through a list of paths and attempt to find a file within one...
Definition: DtVrvFilesystem.h:318
static bool exists(const std::string &path)
Check if the given path is exists.
The DtVrvFilesystem is a wrapper around boost functions that are know to throw exceptions. These functions are all reentrent* however the working directory should not be changed.
Definition: DtVrvFilesystem.h:23