Choreonoid  1.5
FileUtil.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_UTIL_FILE_UTIL_H
7 #define CNOID_UTIL_FILE_UTIL_H
8 
9 #include <boost/filesystem.hpp>
10 #include <string>
11 #include "exportdecl.h"
12 
13 namespace cnoid {
14 
16  const boost::filesystem::path& path,
17  boost::filesystem::path& out_compact);
18 
20  const boost::filesystem::path& directory,
21  const boost::filesystem::path& path,
22  boost::filesystem::path& out_subdirectory);
23 
25  const boost::filesystem::path& from,
26  const boost::filesystem::path& to,
27  boost::filesystem::path& out_relativePath);
28 
29 CNOID_EXPORT std::string getExtension(const boost::filesystem::path& path);
30 
31 /*
32  The following functions were originally defined to support both the version 2 and 3 of
33  the boost.filesystem library. However, supporting the version 2 was stopped, and the use
34  of these functions should be replaced with the original functions of the version 3.
35 */
36 CNOID_EXPORT std::string getGenericPathString(const boost::filesystem::path& path);
37 CNOID_EXPORT bool checkAbsolute(const boost::filesystem::path& path);
38 CNOID_EXPORT boost::filesystem::path getAbsolutePath(const boost::filesystem::path& path);
39 CNOID_EXPORT std::string getAbsolutePathString(const boost::filesystem::path& path);
40 CNOID_EXPORT std::string getFilename(const boost::filesystem::path& path);
41 CNOID_EXPORT std::string getFilename(const std::string& pathString);
42 CNOID_EXPORT std::string getBasename(const boost::filesystem::path& path);
43 CNOID_EXPORT std::string getPathString(const boost::filesystem::path& path);
44 CNOID_EXPORT std::string getNativePathString(const boost::filesystem::path& path);
45 
46 CNOID_EXPORT std::string toActualPathName(const std::string& pathName);
47 
48 }
49 
50 #endif
std::string getAbsolutePathString(const boost::filesystem::path &path)
Definition: FileUtil.cpp:253
bool checkAbsolute(const boost::filesystem::path &path)
Definition: FileUtil.cpp:241
boost::filesystem::path getAbsolutePath(const boost::filesystem::path &path)
Definition: FileUtil.cpp:247
void makePathCompact(const filesystem::path &path, filesystem::path &out_compact)
Definition: FileUtil.cpp:35
std::string getPathString(const boost::filesystem::path &path)
Definition: FileUtil.cpp:278
std::string getBasename(const boost::filesystem::path &path)
Definition: FileUtil.cpp:272
std::string toActualPathName(const std::string &path)
Definition: FileUtil.cpp:117
int findSubDirectory(const filesystem::path &directory, const filesystem::path &path, filesystem::path &out_subdirectory)
Definition: FileUtil.cpp:49
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
std::string getGenericPathString(const boost::filesystem::path &path)
Definition: FileUtil.cpp:235
std::string getFilename(const boost::filesystem::path &path)
Definition: FileUtil.cpp:259
std::string getNativePathString(const boost::filesystem::path &path)
Definition: FileUtil.cpp:284
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
bool findRelativePath(const filesystem::path &from_, const filesystem::path &to, filesystem::path &out_relativePath)
Definition: FileUtil.cpp:82
std::string getExtension(const boost::filesystem::path &path)
Definition: FileUtil.cpp:221