4 * @brief Declaration file for path routines
8 #include "PathContext.h"
9 #include "UnicodeString.h"
12 # define MAX_PATH_FULL 32767
19 * @brief Possible values when checking for file/folder existence.
23 DOES_NOT_EXIST, /**< File or folder does not exist. */
24 IS_EXISTING_FILE, /**< It is existing file */
25 IS_EXISTING_DIR, /**< It is existing folder */
28 bool EndsWithSlash(const String& s);
30 PATH_EXISTENCE DoesPathExist(const String& szPath, bool (*IsArchiveFile)(const String&) = nullptr);
31 String FindFileName(const String& path);
32 String FindExtension(const String& path);
33 String RemoveExtension(const String& path);
34 void normalize(String & sPath);
35 String GetLongPath(const String& szPath, bool bExpandEnvs = true);
36 bool CreateIfNeeded(const String& szPath);
37 PATH_EXISTENCE GetPairComparability(const PathContext & paths, bool (*IsArchiveFile)(const String&) = nullptr);
38 bool IsDirectory(const String& path);
39 bool IsShortcut(const String& inPath);
40 String ExpandShortcut(const String &inFile);
41 String ConcatPath(const String & path, const String & subpath);
42 String GetParentPath(const String& path);
43 String GetLastSubdir(const String & path);
44 bool IsPathAbsolute(const String & path);
45 String EnsurePathExist(const String & sPath);
46 void SplitFilename(const String& s, String * path, String * name, String * ext);
47 String GetPathOnly(const String& fullpath);
48 bool IsURL(const String& path);
49 bool IsURLorCLSID(const String& path);
50 bool IsDecendant(const String& path, const String& ancestor);
51 inline String AddTrailingSlash(const String& path) { return !EndsWithSlash(path) ? path + _T("\\") : path; }
52 String ToWindowsPath(const String& path);
53 String ToUnixPath(const String& path);