Changeset 19926 in vbox for trunk/include/iprt
- Timestamp:
- May 22, 2009 11:37:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/path.h
r19924 r19926 299 299 * such as: 300 300 * <ul> 301 * <li>On DOS-like platforms, both |\| and |/| separator charsare considered301 * <li>On DOS-like platforms, both separator chars (|\| and |/|) are considered 302 302 * to be equal. 303 303 * <li>On platforms with case-insensitive file systems, mismatching characters … … 305 305 * </ul> 306 306 * 307 * File system details are currently ignored. This means that you won't get308 * case-insensitive compares on unix systems when a path goes into a case-insensitive309 * filesystem like FAT, HPFS, HFS, NTFS, JFS, or similar. For NT, OS/2 and similar310 * you'll won't get case-sensitive compares on a case-sensitive file system.311 *312 * @param pszPath1 Path to compare (must be an absolute path).313 * @param pszPath2 Path to compare (must be an absolute path).314 *315 307 * @returns @< 0 if the first path less than the second path. 316 308 * @returns 0 if the first path identical to the second path. 317 309 * @returns @> 0 if the first path greater than the second path. 310 * 311 * @param pszPath1 Path to compare (must be an absolute path). 312 * @param pszPath2 Path to compare (must be an absolute path). 313 * 314 * @remarks File system details are currently ignored. This means that you won't 315 * get case-insentive compares on unix systems when a path goes into a 316 * case-insensitive filesystem like FAT, HPFS, HFS, NTFS, JFS, or 317 * similar. For NT, OS/2 and similar you'll won't get case-sensitve 318 * compares on a case-sensitive file system. 318 319 */ 319 320 RTDECL(int) RTPathCompare(const char *pszPath1, const char *pszPath2); … … 322 323 * Checks if a path starts with the given parent path. 323 324 * 324 * This means that either the path and the parent path matches completely, or that325 * th e path is to some file or directory residing in the tree given by the parent326 * directory.325 * This means that either the path and the parent path matches completely, or 326 * that the path is to some file or directory residing in the tree given by the 327 * parent directory. 327 328 * 328 329 * The path comparison takes platform-dependent details into account, 329 330 * see RTPathCompare() for details. 331 * 332 * @returns |true| when \a pszPath starts with \a pszParentPath (or when they 333 * are identical), or |false| otherwise. 330 334 * 331 335 * @param pszPath Path to check, must be an absolute path. … … 333 337 * No trailing directory slash! 334 338 * 335 * @returns |true| when \a pszPath starts with \a pszParentPath (or when they 336 * are identical), or |false| otherwise. 337 * 338 * @remark This API doesn't currently handle root directory compares in a manner 339 * consistent with the other APIs. RTPathStartsWith(pszSomePath, "/") will 340 * not work if pszSomePath isn't "/". 339 * @remarks This API doesn't currently handle root directory compares in a 340 * manner consistant with the other APIs. RTPathStartsWith(pszSomePath, 341 * "/") will not work if pszSomePath isn't "/". 341 342 */ 342 343 RTDECL(bool) RTPathStartsWith(const char *pszPath, const char *pszParentPath); 344 345 /** 346 * Appends one partial path to another. 347 * 348 * The main purpose of this function is to deal correctly with leading and 349 * trailing slashes. 350 * 351 * @returns IPRT status code. 352 * @retval VERR_PATH 353 * 354 * @param pszPath The path to append pszAppend to. This serves as both 355 * input and output. This can be empty, in which case 356 * pszAppend is just copied over. 357 * @param cchPathDst The size of the buffer pszPath points to. This 358 * should NOT be strlen(pszPath). 359 * @param pszAppend The partial path to append to pszPath. This can be 360 * NULL, in which case nothing is done. 361 * 362 * @remarks On OS/2, Window and similar systems, concatenating a drive letter 363 * specifier with a root prefixed path will result in an absolute path. 364 * Meaning, RTPathAppend(strcpy(szBuf, "C:"), sizeof(szBuf), "/bar") 365 * will result in "C:/bar". (This follows directly from the behavior 366 * when pszPath is empty.) 367 */ 368 RTDECL(int) RTPathAppend(char *pszPath, size_t cchPathDst, const char *pszAppend); 343 369 344 370
Note:
See TracChangeset
for help on using the changeset viewer.