Changeset 34214 in vbox for trunk/include/iprt
- Timestamp:
- Nov 19, 2010 5:18:15 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67956
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/path.h
r34002 r34214 445 445 * NULL, in which case nothing is done. 446 446 * 447 * @remarks See the RTPathAppendEx remarks. 448 */ 449 RTDECL(int) RTPathAppend(char *pszPath, size_t cbPathDst, const char *pszAppend); 450 451 /** 452 * Appends one partial path to another. 453 * 454 * The main purpose of this function is to deal correctly with the slashes when 455 * concatenating the two partial paths. 456 * 457 * @retval VINF_SUCCESS on success. 458 * @retval VERR_BUFFER_OVERFLOW if the result is too big to fit within 459 * cbPathDst bytes. No changes has been made. 460 * @retval VERR_INVALID_PARAMETER if the string pointed to by pszPath is longer 461 * than cbPathDst-1 bytes (failed to find terminator). Asserted. 462 * 463 * @param pszPath The path to append pszAppend to. This serves as both 464 * input and output. This can be empty, in which case 465 * pszAppend is just copied over. 466 * @param cbPathDst The size of the buffer pszPath points to, terminator 467 * included. This should NOT be strlen(pszPath). 468 * @param pszAppend The partial path to append to pszPath. This can be 469 * NULL, in which case nothing is done. 470 * @param cchAppendMax The maximum number or characters to take from @a 471 * pszAppend. RTSTR_MAX is fine. 472 * 447 473 * @remarks On OS/2, Window and similar systems, concatenating a drive letter 448 474 * specifier with a slash prefixed path will result in an absolute … … 456 482 * sizeof(szBuf), "bar") will result in "C:bar". 457 483 */ 458 RTDECL(int) RTPathAppend (char *pszPath, size_t cbPathDst, const char *pszAppend);484 RTDECL(int) RTPathAppendEx(char *pszPath, size_t cbPathDst, const char *pszAppend, size_t cchAppendMax); 459 485 460 486 /** … … 492 518 */ 493 519 RTDECL(char *) RTPathJoinA(const char *pszPathSrc, const char *pszAppend); 520 521 /** 522 * Extended version of RTPathJoin, both inputs can be specified as substrings. 523 * 524 * @retval VINF_SUCCESS on success. 525 * @retval VERR_BUFFER_OVERFLOW if the result is too big to fit within 526 * cbPathDst bytes. 527 * @retval VERR_INVALID_PARAMETER if the string pointed to by pszPath is longer 528 * than cbPathDst-1 bytes (failed to find terminator). Asserted. 529 * 530 * @param pszPathDst Where to store the resulting path. 531 * @param cbPathDst The size of the buffer pszPathDst points to, 532 * terminator included. 533 * @param pszPathSrc The base path to copy into @a pszPathDst before 534 * appending @a pszAppend. 535 * @param cchPathSrcMax The maximum number of bytes to copy from @a 536 * pszPathSrc. RTSTR_MAX is find. 537 * @param pszAppend The partial path to append to pszPathSrc. This can 538 * be NULL, in which case nothing is done. 539 * @param cchAppendMax The maximum number of bytes to copy from @a 540 * pszAppend. RTSTR_MAX is find. 541 * 542 */ 543 RTDECL(int) RTPathJoinEx(char *pszPathDst, size_t cbPathDst, 544 const char *pszPathSrc, size_t cchPathSrcMax, 545 const char *pszAppend, size_t cchAppendMax); 494 546 495 547 /**
Note:
See TracChangeset
for help on using the changeset viewer.