Go to the documentation of this file.
6 #ifndef CNOID_UTIL_FILE_UTIL_H
7 #define CNOID_UTIL_FILE_UTIL_H
9 #include <cnoid/stdx/filesystem>
11 #include "exportdecl.h"
23 [[deprecated(
"Use filesystem::lexically_normal(path).")]]
24 CNOID_EXPORT stdx::filesystem::path
getCompactPath(
const stdx::filesystem::path& path);
26 [[deprecated(
"Use filesystem::lexically_normal(path).")]]
31 const stdx::filesystem::path& directory,
32 const stdx::filesystem::path& path,
33 stdx::filesystem::path& out_subdirectory);
36 const stdx::filesystem::path& from,
37 const stdx::filesystem::path& to,
38 stdx::filesystem::path& out_relativePath);
44 [[deprecated(
"Use path.extension().string(). Note that the dot character is added to the beginning of the string.")]]
45 CNOID_EXPORT std::string
getExtension(
const stdx::filesystem::path& path);
47 [[deprecated(
"Use path.generic_string().")]]
50 [[deprecated(
"Use path.isAbsolute().")]]
51 CNOID_EXPORT
bool checkAbsolute(
const stdx::filesystem::path& path);
53 [[deprecated(
"Use filesystem::absolute(path).")]]
54 CNOID_EXPORT stdx::filesystem::path
getAbsolutePath(
const stdx::filesystem::path& path);
56 [[deprecated(
"Use filesystem::absolute(path).string().")]]
59 [[deprecated(
"Use path.filename().string().")]]
60 CNOID_EXPORT std::string
getFilename(
const stdx::filesystem::path& path);
62 [[deprecated(
"Make a filesystem::path object and use filename().string().")]]
63 CNOID_EXPORT std::string
getFilename(
const std::string& pathString);
65 [[deprecated(
"Use path.stem().string().")]]
66 CNOID_EXPORT std::string
getBasename(
const stdx::filesystem::path& path);
68 [[deprecated(
"Use path.string().")]]
69 CNOID_EXPORT std::string
getPathString(
const stdx::filesystem::path& path);
71 [[deprecated(
"Use path.make_preferred().string().")]]
74 [[deprecated(
"Use the original string value passed as an argument.")]]
const char * DLL_PREFIX
Definition: FileUtil.cpp:29
bool findRelativePath(const filesystem::path &from_, const filesystem::path &to, filesystem::path &out_relativePath)
Definition: FileUtil.cpp:97
std::string toActualPathName(const std::string &path)
Definition: FileUtil.cpp:195
std::string getExtension(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:135
bool checkAbsolute(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:153
const char * EXEC_SUFFIX
Definition: FileUtil.cpp:32
std::string getFilename(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:168
const char * DLL_SUFFIX
Definition: FileUtil.cpp:30
void makePathCompact(filesystem::path &io_path)
Definition: FileUtil.cpp:55
std::string getPathString(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:184
std::string getAbsolutePathString(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:163
Definition: AbstractSceneLoader.h:11
std::string getBasename(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:179
std::string getNativePathString(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:189
filesystem::path getCompactPath(const filesystem::path &path)
Definition: FileUtil.cpp:38
const char * DLL_EXTENSION
Definition: FileUtil.cpp:31
const char * EXEC_EXTENSION
Definition: FileUtil.cpp:33
const char * PATH_DELIMITER
Definition: FileUtil.cpp:34
int findSubDirectory(const filesystem::path &directory, const filesystem::path &path, filesystem::path &out_subdirectory)
Definition: FileUtil.cpp:65
stdx::filesystem::path getAbsolutePath(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:158
std::string getGenericPathString(const stdx::filesystem::path &path)
Definition: FileUtil.cpp:148