VirtualBox

Changeset 31304 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Aug 2, 2010 2:01:05 PM (14 years ago)
Author:
vboxsync
Message:

IPRT: Added RTPathGetMode().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/path.cpp

    r28916 r31304  
    188188}
    189189
     190
     191RTR3DECL(int) RTPathGetMode(const char *pszPath, PRTFMODE pfMode)
     192{
     193    AssertPtrReturn(pfMode, VERR_INVALID_POINTER);
     194
     195    char szPathReal[RTPATH_MAX];
     196    int rc = RTPathReal(pszPath, szPathReal, sizeof(szPathReal));
     197    if (RT_SUCCESS(rc))
     198    {
     199        RTFSOBJINFO objInfo;
     200        rc = RTPathQueryInfo(szPathReal, &objInfo, RTFSOBJATTRADD_NOTHING);
     201        if (RT_SUCCESS(rc))
     202            *pfMode = objInfo.Attr.fMode;
     203    }
     204
     205    return rc;
     206}
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