third_party/virtualbox/src/VBox/Main/src-client/GuestSessionImpl.cpp
/**
 * Queries information about a directory on the guest.
 *
 * @returns VBox status code, or VERR_NOT_A_DIRECTORY if the file system object exists but is not a directory.
 * @param   strPath             Path to directory to query information for.
 * @param   fFollowSymlinks     Whether to follow symlinks or not.
 * @param   objData             Where to store the information returned on success.
 * @param   pGuestRc            Guest rc, when returning VERR_GSTCTL_GUEST_ERROR.
 */
Queries information about a directory on the guest.
@returns VBox status code, or VERR_NOT_A_DIRECTORY if the file system object exists but is not a directory.
@param   strPath             Path to directory to query information for.
@param   fFollowSymlinks     Whether to follow symlinks or not.
@param   objData             Where to store the information returned on success.
@param   pGuestRc            Guest rc, when returning VERR_GSTCTL_GUEST_ERROR.
Queries information about a directory on the guest . @returns VBox status code or VERR_NOT_A_DIRECTORY if the file system object exists but is not a directory . @param strPath Path to directory to query information for . @param fFollowSymlinks Whether to follow symlinks or not . @param objData Where to store the information returned on success . @param pGuestRc Guest rc when returning VERR_GSTCTL_GUEST_ERROR .
int GuestSession::i_directoryQueryInfoInternal(const Utf8Str &strPath, bool fFollowSymlinks,
                                               GuestFsObjData &objData, int *pGuestRc)
{
    AssertPtrReturn(pGuestRc, VERR_INVALID_POINTER);
    LogFlowThisFunc(("strPath=%s, fFollowSymlinks=%RTbool\n", strPath.c_str(), fFollowSymlinks));
    int vrc = i_fsQueryInfoInternal(strPath, fFollowSymlinks, objData, pGuestRc);
    if (RT_SUCCESS(vrc))
    {
        vrc = objData.mType == FsObjType_Directory
            ? VINF_SUCCESS : VERR_NOT_A_DIRECTORY;
    }
    LogFlowFuncLeaveRC(vrc);
    return vrc;
}
int GuestSession :: i_directoryQueryInfoInternal ( const Utf8Str & strPath , bool fFollowSymlinks , GuestFsObjData & objData , int * pGuestRc ) { AssertPtrReturn ( pGuestRc , VERR_INVALID_POINTER ) ; LogFlowThisFunc ( ( " \n " , strPath . c_str ( ) , fFollowSymlinks ) ) ; int vrc = i_fsQueryInfoInternal ( strPath , fFollowSymlinks , objData , pGuestRc ) ; if ( RT_SUCCESS ( vrc ) ) { vrc = objData . mType == FsObjType_Directory ? VINF_SUCCESS : VERR_NOT_A_DIRECTORY ; } LogFlowFuncLeaveRC ( vrc ) ; return vrc ; }
Queries information about a directory on the guest.
Queries information about a directory on the guest .