VirtualBox

Changeset 83321 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 19, 2020 9:24:58 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136514
Message:

Guest Control/Main: Added GuestSession::i_directoryExists().

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestSessionImpl.h

    r82968 r83321  
    281281    int                     i_closeSession(uint32_t uFlags, uint32_t uTimeoutMS, int *pGuestRc);
    282282    HRESULT                 i_directoryCopyFlagFromStr(const com::Utf8Str &strFlags, DirectoryCopyFlag_T *pfFlags);
     283    bool                    i_directoryExists(const Utf8Str &strPath);
    283284    inline bool             i_directoryExists(uint32_t uDirID, ComObjPtr<GuestDirectory> *pDir);
    284285    int                     i_directoryUnregister(GuestDirectory *pDirectory);
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r83320 r83321  
    937937    LogFlowFuncLeaveRC(vrc);
    938938    return vrc;
     939}
     940
     941/**
     942 * Checks if a directory on the guest exists.
     943 *
     944 * @returns \c true if directory exists on the guest, \c false if not.
     945 * @param   strPath             Path of directory to check.
     946 */
     947bool GuestSession::i_directoryExists(const Utf8Str &strPath)
     948{
     949    GuestFsObjData objDataIgnored;
     950    int rcGuestIgnored;
     951    int rc = i_directoryQueryInfo(strPath, true /* fFollowSymlinks */, objDataIgnored, &rcGuestIgnored);
     952
     953    return RT_SUCCESS(rc);
    939954}
    940955
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette