VirtualBox

Changeset 71872 in vbox for trunk


Ignore:
Timestamp:
Apr 17, 2018 12:16:10 PM (7 years ago)
Author:
vboxsync
Message:

Guest Control/Main: Added GuestFsObjData::GetFileMode().

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

Legend:

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

    r71786 r71872  
    646646    /** @}  */
    647647
     648    /** @name helper functions to work with IPRT stuff.
     649     * @{ */
     650    RTFMODE GetFileMode(void) const;
     651    /** @}  */
     652
    648653    int64_t              mAccessTime;
    649654    int64_t              mAllocatedSize;
  • trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

    r71561 r71872  
    201201}
    202202
     203/**
     204 * Returns the IPRT-compatible file mode.
     205 * Note: Only handling RTFS_TYPE_ flags are implemented for now.
     206 *
     207 * @return IPRT file mode.
     208 */
     209RTFMODE GuestFsObjData::GetFileMode(void) const
     210{
     211    RTFMODE fMode = 0;
     212
     213    switch (mType)
     214    {
     215        case FsObjType_Directory:
     216            fMode |= RTFS_TYPE_DIRECTORY;
     217            break;
     218
     219        case FsObjType_File:
     220            fMode |= RTFS_TYPE_FILE;
     221            break;
     222
     223        case FsObjType_Symlink:
     224            fMode |= RTFS_TYPE_SYMLINK;
     225            break;
     226
     227        default:
     228            break;
     229    }
     230
     231    /** @todo Implement more stuff. */
     232
     233    return fMode;
     234}
     235
    203236///////////////////////////////////////////////////////////////////////////////
    204237
Note: See TracChangeset for help on using the changeset viewer.

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