18 namespace boost {
namespace filesystem {
38 Path(
const std::string& unicodePath = std::string());
41 Path(
const char* unicodePath);
47 Path(
const boost::filesystem::path& path);
62 bool isRegularFile()
const;
65 bool isSymlink()
const;
68 std::string filename()
const;
71 std::string extension()
const;
77 Path absolute()
const;
89 explicit operator std::string()
const;
92 std::string str()
const;
95 operator boost::filesystem::path()
const;
98 const boost::filesystem::path& bfsPath()
const;
101 static Path fromNative(
const char* nativeCharsPath);
104 static Path fromNative(
const wchar_t* nativeCharsPath);
107 static Path fromNative(
const std::string& nativeCharsPath);
110 static Path fromNative(
const std::wstring& nativeCharsPath);
127 output << path.
str();
132 std::unique_ptr<PrivatePath> _p;
162 void removeAll(
int retry);
301 const std::string& filename,
302 bool excludeUserWritablePath =
false);
333 const std::string& filename,
334 bool excludeUserWritablePath =
false);
369 QI_API std::vector<std::string>
listData(
const std::string& applicationName,
370 const std::string& pattern=
"*",
371 bool excludeUserWritablePath =
false);
375 QI_API std::vector<std::string>
listLib(
const std::string& subfolder,
376 const std::string& pattern=
"*");
391 QI_API std::vector<std::string>
confPaths(
const std::string& applicationName=
"",
392 bool excludeUserWritablePath =
false);
417 QI_API std::vector<std::string>
dataPaths(
const std::string& applicationName=
"",
418 bool excludeUserWritablePath =
false);
466 const std::string& filename);
488 const std::string& filename=
"");
532 #endif // _QI_PATH_HPP_
std::vector< std::string > confPaths(const std::string &applicationName="", bool excludeUserWritablePath=false)
Get the list of directories used when searching for configuration files for the given application nam...
std::string findBin(const std::string &name, bool searchInPath=false)
Look for a binary.
codecvt_type & unicodeFacet()
UTF-8 facet object getter.
void setWritablePath(const std::string &path)
Set the writable files path for users.
std::vector< std::string > getSdkPrefixes()
Return the SDK prefixes list. It's always complete, native paths.
void addOptionalSdkPrefix(const char *prefix)
Add a new SDK prefix to the list of searchable prefixes.
std::vector< std::string > listLib(const std::string &subfolder, const std::string &pattern="*")
std::vector< Path > PathVector
friend std::ostream & operator<<(std::ostream &output, const qi::Path &path)
Standard output stream operator for logging.
dll import/export and compiler message
std::string findConf(const std::string &applicationName, const std::string &filename, bool excludeUserWritablePath=false)
Look for a configuration file.
std::string findLib(const std::string &name)
Look for a library.
std::vector< std::string > libPaths()
Get the list of directories used when searching for libraries.
std::vector< std::string > listData(const std::string &applicationName, const std::string &pattern="*", bool excludeUserWritablePath=false)
List data files matching the given pattern in all dataPaths(applicationName) directories. For each match, return the occurence from the first dataPaths prefix. Directories are discarded.
std::string convertToDosPath(const std::string &pathString)
Convert given path into DOS 8.3 path if it exists, else returns empty string (Windows only)...
bool operator==(const Signature &lhs, const Signature &rhs)
#define QI_API_DEPRECATED_MSG(msg__)
Compiler flags to mark a function as deprecated. It will generate a compiler warning.
The Path class allow handling filesystem path in a cross-platform maner. <includename>qi/path.hpp</includename> The class assume that all string are encoded in UTF-8 if not specified otherwise.
Path normalize(const Path &path)
std::string userWritableDataPath(const std::string &applicationName, const std::string &filename)
Get the writable data files path for users.
std::vector< std::string > binPaths()
Get the list of directories used when searching for binaries.
std::string findData(const std::string &applicationName, const std::string &filename, bool excludeUserWritablePath=false)
Look for a file in all dataPaths(applicationName) directories, return the first match.
std::string sdkPrefix()
Return the default SDK prefix path.
std::string userWritableConfPath(const std::string &applicationName, const std::string &filename="")
Get the writable configuration files path for users.
std::vector< std::string > dataPaths(const std::string &applicationName="", bool excludeUserWritablePath=false)
Get the list of directories used when searching for data files for the given application name...
void clearOptionalSdkPrefix()
Reset the list of additional SDK prefixes.
std::codecvt< wchar_t, char, std::mbstate_t > codecvt_type
Standard std::codecvt type accepted by STL and boost.
bool operator!=(const Signature &lhs, const Signature &rhs)