- Timestamp:
- May 13, 2013 11:55:58 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/dir.h
r46013 r46014 421 421 * compose this, it's NOT sufficient to pass 422 422 * RTDIRENTRY::szName! 423 * @param fFollowSym Links Whether to follow symbolic links or not.423 * @param fFollowSymlinks Whether to follow symbolic links or not. 424 424 * @param penmType Pointer to the RTDIRENTRY::enmType member. If this 425 * is not RTDIRENTRYTYPE_UNKNOWN, the function will 426 * return immediately without doing anything. If it 427 * is, it will use RTPathQueryInfo to try figure out 428 * the correct value. On failure, this will be 429 * unchanged. 430 */ 431 RTDECL(int) RTDirQueryUnknownType(const char *pszComposedName, bool fFollowSymLinks, RTDIRENTRYTYPE *penmType); 425 * is not RTDIRENTRYTYPE_UNKNOWN and, if 426 * @a fFollowSymlinks is false, not 427 * RTDIRENTRYTYPE_SYMLINK, the function will return 428 * immediately without doing anything. Otherwise it 429 * will use RTPathQueryInfo to try figure out the 430 * correct value. On failure, this will be unchanged. 431 */ 432 RTDECL(int) RTDirQueryUnknownType(const char *pszComposedName, bool fFollowSymlinks, RTDIRENTRYTYPE *penmType); 432 433 433 434 /** … … 439 440 * compose this, it's NOT sufficient to pass 440 441 * RTDIRENTRY::szName! 441 * @param fFollowSym Links Whether to follow symbolic links or not.442 * @param fFollowSymlinks Whether to follow symbolic links or not. 442 443 * @param penmType Pointer to the RTDIRENTRY::enmType member or 443 444 * similar. Will NOT be checked on input. 444 445 * @param pObjInfo The object info buffer to use with RTPathQueryInfo. 445 446 */ 446 RTDECL(int) RTDirQueryUnknownTypeEx(const char *pszComposedName, bool fFollowSym Links, RTDIRENTRYTYPE *penmType, PRTFSOBJINFO pObjInfo);447 RTDECL(int) RTDirQueryUnknownTypeEx(const char *pszComposedName, bool fFollowSymlinks, RTDIRENTRYTYPE *penmType, PRTFSOBJINFO pObjInfo); 447 448 448 449 /** -
trunk/src/VBox/Runtime/r3/dir.cpp
r46013 r46014 732 732 733 733 734 RTDECL(int) RTDirQueryUnknownTypeEx(const char *pszComposedName, bool fFollowSym Links,734 RTDECL(int) RTDirQueryUnknownTypeEx(const char *pszComposedName, bool fFollowSymlinks, 735 735 RTDIRENTRYTYPE *penmType, PRTFSOBJINFO pObjInfo) 736 736 { 737 737 int rc = RTPathQueryInfoEx(pszComposedName, pObjInfo, RTFSOBJATTRADD_NOTHING, 738 fFollowSym Links ? RTPATH_F_FOLLOW_LINK : RTPATH_F_ON_LINK);738 fFollowSymlinks ? RTPATH_F_FOLLOW_LINK : RTPATH_F_ON_LINK); 739 739 if (RT_FAILURE(rc)) 740 740 return rc; … … 763 763 764 764 765 RTDECL(int) RTDirQueryUnknownType(const char *pszComposedName, bool fFollowSymLinks, RTDIRENTRYTYPE *penmType) 766 { 767 if (*penmType != RTDIRENTRYTYPE_UNKNOWN) 765 RTDECL(int) RTDirQueryUnknownType(const char *pszComposedName, bool fFollowSymlinks, RTDIRENTRYTYPE *penmType) 766 { 767 if ( *penmType != RTDIRENTRYTYPE_UNKNOWN 768 && ( !fFollowSymlinks 769 || *penmType != RTDIRENTRYTYPE_SYMLINK)) 768 770 return VINF_SUCCESS; 769 771 770 772 RTFSOBJINFO ObjInfo; 771 return RTDirQueryUnknownTypeEx(pszComposedName, fFollowSym Links, penmType, &ObjInfo);773 return RTDirQueryUnknownTypeEx(pszComposedName, fFollowSymlinks, penmType, &ObjInfo); 772 774 } 773 775
Note:
See TracChangeset
for help on using the changeset viewer.