Changeset 99758 in vbox for trunk/src/VBox/Runtime/common/path
- Timestamp:
- May 11, 2023 9:37:59 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 157349
- Location:
- trunk/src/VBox/Runtime/common/path
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/path/RTPathAbsDup.cpp
r98103 r99758 43 43 44 44 45 /**46 * Same as RTPathAbs only the result is RTStrDup()'ed.47 *48 * @returns Pointer to real path. Use RTStrFree() to free this string.49 * @returns NULL if RTPathAbs() or RTStrDup() fails.50 * @param pszPath The path to resolve.51 */52 45 RTDECL(char *) RTPathAbsDup(const char *pszPath) 53 46 { -
trunk/src/VBox/Runtime/common/path/RTPathParentLength.cpp
r98103 r99758 85 85 86 86 87 88 89 /**90 * Determins the length of the path specifying the parent directory, including91 * trailing path separator (if present).92 *93 * @returns Parent directory part of the path, 0 if no parent.94 * @param pszPath The path to examine.95 *96 * @note Currently ignores UNC and may therefore return the server or97 * double-slash prefix as parent.98 */99 87 RTDECL(size_t) RTPathParentLength(const char *pszPath) 100 88 { -
trunk/src/VBox/Runtime/common/path/RTPathParseSimple.cpp
r98103 r99758 46 46 47 47 48 /**49 * Parses a path.50 *51 * It figures the length of the directory component, the offset of52 * the file name and the location of the suffix dot.53 *54 * @returns The path length.55 *56 * @param pszPath Path to find filename in.57 * @param pcchDir Where to put the length of the directory component. If58 * no directory, this will be 0. Optional.59 * @param poffName Where to store the filename offset.60 * If empty string or if it's ending with a slash this61 * will be set to -1. Optional.62 * @param poffSuff Where to store the suffix offset (the last dot).63 * If empty string or if it's ending with a slash this64 * will be set to -1. Optional.65 */66 48 RTDECL(size_t) RTPathParseSimple(const char *pszPath, size_t *pcchDir, ssize_t *poffName, ssize_t *poffSuff) 67 49 { -
trunk/src/VBox/Runtime/common/path/RTPathRealDup.cpp
r98103 r99758 47 47 48 48 49 /**50 * Same as RTPathReal only the result is RTStrDup()'ed.51 *52 * @returns Pointer to real path. Use RTStrFree() to free this string.53 * @returns NULL if RTPathReal() or RTStrDup() fails.54 * @param pszPath55 */56 49 RTDECL(char *) RTPathRealDup(const char *pszPath) 57 50 { -
trunk/src/VBox/Runtime/common/path/comparepaths.cpp
r98103 r99758 114 114 115 115 116 /**117 * Compares two paths.118 *119 * The comparison takes platform-dependent details into account,120 * such as:121 * <ul>122 * <li>On DOS-like platforms, both separator chars (|\| and |/|) are considered123 * to be equal.124 * <li>On platforms with case-insensitive file systems, mismatching characters125 * are uppercased and compared again.126 * </ul>127 *128 * @returns @< 0 if the first path less than the second path.129 * @returns 0 if the first path identical to the second path.130 * @returns @> 0 if the first path greater than the second path.131 *132 * @param pszPath1 Path to compare (must be an absolute path).133 * @param pszPath2 Path to compare (must be an absolute path).134 *135 * @remarks File system details are currently ignored. This means that you won't136 * get case-insensitive compares on unix systems when a path goes into a137 * case-insensitive filesystem like FAT, HPFS, HFS, NTFS, JFS, or138 * similar. For NT, OS/2 and similar you'll won't get case-sensitive139 * compares on a case-sensitive file system.140 */141 116 RTDECL(int) RTPathCompare(const char *pszPath1, const char *pszPath2) 142 117 { … … 145 120 146 121 147 /**148 * Checks if a path starts with the given parent path.149 *150 * This means that either the path and the parent path matches completely, or151 * that the path is to some file or directory residing in the tree given by the152 * parent directory.153 *154 * The path comparison takes platform-dependent details into account,155 * see RTPathCompare() for details.156 *157 * @returns |true| when \a pszPath starts with \a pszParentPath (or when they158 * are identical), or |false| otherwise.159 *160 * @param pszPath Path to check, must be an absolute path.161 * @param pszParentPath Parent path, must be an absolute path.162 * No trailing directory slash!163 */164 122 RTDECL(bool) RTPathStartsWith(const char *pszPath, const char *pszParentPath) 165 123 {
Note:
See TracChangeset
for help on using the changeset viewer.