12 #ifndef smtk_common_Paths_h
13 #define smtk_common_Paths_h
15 #include "smtk/CoreExports.h"
16 #include "smtk/common/CompilerInformation.h"
20 #pragma warning(disable : 4251)
45 Paths(
const std::string& argv0);
47 static std::string currentDirectory();
48 static bool directoryExists(
const std::string& path);
49 static bool createDirectory(
const std::string& path);
50 static std::vector<std::string> pruneInvalidDirectories(
const std::vector<std::string>& src);
51 static std::string pathToLibraryContainingFunction(
void (*func)());
52 static std::string pathToThisLibrary();
54 static bool fileExists(
const std::string& path);
55 static bool isRelative(
const std::string& path);
56 static bool areEquivalent(
const std::string& pathA,
const std::string& pathB);
57 static std::string canonical(
const std::string& path,
const std::string& base = {});
58 static std::string directory(
const std::string& path);
59 static std::string filename(
const std::string& path);
60 static std::string stem(
const std::string& path);
61 static std::string extension(
const std::string& path);
62 static std::string replaceExtension(
const std::string& path,
const std::string& newExtension);
63 static std::string replaceFilename(
const std::string& path,
const std::string& newFilename);
64 static std::string tempDirectory();
65 static std::string uniquePath();
67 std::string executableDirectory();
68 std::string toplevelDirectory();
69 std::string bundleDirectory();
70 std::vector<std::string> workerSearchPaths(
bool pruneInvalid =
true);
72 std::string toplevelDirectoryConfigured();
100 #endif // smtk_common_Paths_h