VirtualBox

Changeset 99758 in vbox for trunk/src/VBox/Runtime/r3/nt


Ignore:
Timestamp:
May 11, 2023 9:37:59 PM (21 months ago)
Author:
vboxsync
Message:

IPRT: Make doxygen 1.9.6 happy. Mostly removing duplicate docs (iprt is documented in the header files). bugref:10442

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/nt/dirrel-r3-nt.cpp

    r98103 r99758  
    482482
    483483
    484 /**
    485  * Changes the mode flags of a file system object relative to @a hDir.
    486  *
    487  * The API requires at least one of the mode flag sets (Unix/Dos) to
    488  * be set. The type is ignored.
    489  *
    490  * @returns IPRT status code.
    491  * @param   hDir            The directory @a pszRelPath is relative to.
    492  * @param   pszRelPath      The relative path to the file system object.
    493  * @param   fMode           The new file mode, see @ref grp_rt_fs for details.
    494  * @param   fFlags          RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.
    495  *
    496  * @sa      RTPathSetMode
    497  */
    498484RTDECL(int) RTDirRelPathSetMode(RTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fFlags)
    499485{
     
    550536
    551537
    552 /**
    553  * Changes one or more of the timestamps associated of file system object
    554  * relative to @a hDir.
    555  *
    556  * @returns IPRT status code.
    557  * @param   hDir                The directory @a pszRelPath is relative to.
    558  * @param   pszRelPath          The relative path to the file system object.
    559  * @param   pAccessTime         Pointer to the new access time.
    560  * @param   pModificationTime   Pointer to the new modification time.
    561  * @param   pChangeTime         Pointer to the new change time. NULL if not to be changed.
    562  * @param   pBirthTime          Pointer to the new time of birth. NULL if not to be changed.
    563  * @param   fFlags              RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.
    564  *
    565  * @remark  The file system might not implement all these time attributes,
    566  *          the API will ignore the ones which aren't supported.
    567  *
    568  * @remark  The file system might not implement the time resolution
    569  *          employed by this interface, the time will be chopped to fit.
    570  *
    571  * @remark  The file system may update the change time even if it's
    572  *          not specified.
    573  *
    574  * @remark  POSIX can only set Access & Modification and will always set both.
    575  *
    576  * @sa      RTPathSetTimesEx
    577  */
    578538RTDECL(int) RTDirRelPathSetTimes(RTDIR hDir, const char *pszRelPath, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime,
    579539                                 PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime, uint32_t fFlags)
     
    586546    int rc = rtDirRelBuildFullPath(pThis, szPath, sizeof(szPath), pszRelPath);
    587547    if (RT_SUCCESS(rc))
    588     {
    589 RTAssertMsg2("DBG: RTDirRelPathSetTimes(%s)...\n", szPath);
    590548        rc = RTPathSetTimesEx(szPath, pAccessTime, pModificationTime, pChangeTime, pBirthTime, fFlags);
    591     }
    592     return rc;
    593 }
    594 
    595 
    596 /**
    597  * Changes the owner and/or group of a file system object relative to @a hDir.
    598  *
    599  * @returns IPRT status code.
    600  * @param   hDir            The directory @a pszRelPath is relative to.
    601  * @param   pszRelPath      The relative path to the file system object.
    602  * @param   uid             The new file owner user id.  Pass NIL_RTUID to leave
    603  *                          this unchanged.
    604  * @param   gid             The new group id.  Pass NIL_RTGID to leave this
    605  *                          unchanged.
    606  * @param   fFlags          RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.
    607  *
    608  * @sa      RTPathSetOwnerEx
    609  */
     549    return rc;
     550}
     551
     552
    610553RTDECL(int) RTDirRelPathSetOwner(RTDIR hDir, const char *pszRelPath, uint32_t uid, uint32_t gid, uint32_t fFlags)
    611554{
     
    618561    if (RT_SUCCESS(rc))
    619562    {
    620 RTAssertMsg2("DBG: RTDirRelPathSetOwner(%s)...\n", szPath);
    621563#ifndef RT_OS_WINDOWS
    622564        rc = RTPathSetOwnerEx(szPath, uid, gid, fFlags);
     
    630572
    631573
    632 /**
    633  * Renames a directory relative path within a filesystem.
    634  *
    635  * This will rename symbolic links.  If RTPATHRENAME_FLAGS_REPLACE is used and
    636  * pszDst is a symbolic link, it will be replaced and not its target.
    637  *
    638  * @returns IPRT status code.
    639  * @param   hDirSrc         The directory the source path is relative to.
    640  * @param   pszSrc          The source path, relative to @a hDirSrc.
    641  * @param   hDirSrc         The directory the destination path is relative to.
    642  * @param   pszDst          The destination path, relative to @a hDirDst.
    643  * @param   fRename         Rename flags, RTPATHRENAME_FLAGS_XXX.
    644  *
    645  * @sa      RTPathRename
    646  */
    647574RTDECL(int) RTDirRelPathRename(RTDIR hDirSrc, const char *pszSrc, RTDIR hDirDst, const char *pszDst, unsigned fRename)
    648575{
     
    665592        rc = rtDirRelBuildFullPath(pThis, szDstPath, sizeof(szDstPath), pszDst);
    666593        if (RT_SUCCESS(rc))
    667         {
    668 RTAssertMsg2("DBG: RTDirRelPathRename(%s,%s)...\n", szSrcPath, szDstPath);
    669594            rc = RTPathRename(szSrcPath, szDstPath, fRename);
    670         }
    671     }
    672     return rc;
    673 }
    674 
    675 
    676 /**
    677  * Removes the last component of the directory relative path.
    678  *
    679  * @returns IPRT status code.
    680  * @param   hDir            The directory @a pszRelPath is relative to.
    681  * @param   pszRelPath      The relative path to the file system object.
    682  * @param   fUnlink         Unlink flags, RTPATHUNLINK_FLAGS_XXX.
    683  *
    684  * @sa      RTPathUnlink
    685  */
     595    }
     596    return rc;
     597}
     598
     599
    686600RTDECL(int) RTDirRelPathUnlink(RTDIR hDir, const char *pszRelPath, uint32_t fUnlink)
    687601{
     
    693607    int rc = rtDirRelBuildFullPath(pThis, szPath, sizeof(szPath), pszRelPath);
    694608    if (RT_SUCCESS(rc))
    695     {
    696 RTAssertMsg2("DBG: RTDirRelPathUnlink(%s)...\n", szPath);
    697609        rc = RTPathUnlink(szPath, fUnlink);
    698     }
    699610    return rc;
    700611}
     
    711622
    712623
    713 /**
    714  * Creates a symbolic link (@a pszSymlink) relative to @a hDir targeting @a
    715  * pszTarget.
    716  *
    717  * @returns IPRT status code.
    718  * @param   hDir            The directory @a pszSymlink is relative to.
    719  * @param   pszSymlink      The relative path of the symbolic link.
    720  * @param   pszTarget       The path to the symbolic link target.  This is
    721  *                          relative to @a pszSymlink or an absolute path.
    722  * @param   enmType         The symbolic link type.  For Windows compatability
    723  *                          it is very important to set this correctly.  When
    724  *                          RTSYMLINKTYPE_UNKNOWN is used, the API will try
    725  *                          make a guess and may attempt query information
    726  *                          about @a pszTarget in the process.
    727  * @param   fCreate         Create flags, RTSYMLINKCREATE_FLAGS_XXX.
    728  *
    729  * @sa      RTSymlinkCreate
    730  */
    731624RTDECL(int) RTDirRelSymlinkCreate(RTDIR hDir, const char *pszSymlink, const char *pszTarget,
    732625                                  RTSYMLINKTYPE enmType, uint32_t fCreate)
     
    739632    int rc = rtDirRelBuildFullPath(pThis, szPath, sizeof(szPath), pszSymlink);
    740633    if (RT_SUCCESS(rc))
    741     {
    742 RTAssertMsg2("DBG: RTDirRelSymlinkCreate(%s)...\n", szPath);
    743634        rc = RTSymlinkCreate(szPath, pszTarget, enmType, fCreate);
    744     }
    745     return rc;
    746 }
    747 
    748 
    749 /**
    750  * Read the symlink target relative to @a hDir.
    751  *
    752  * @returns IPRT status code.
    753  * @retval  VERR_NOT_SYMLINK if @a pszSymlink does not specify a symbolic link.
    754  * @retval  VERR_BUFFER_OVERFLOW if the link is larger than @a cbTarget.  The
    755  *          buffer will contain what all we managed to read, fully terminated
    756  *          if @a cbTarget > 0.
    757  *
    758  * @param   hDir            The directory @a pszSymlink is relative to.
    759  * @param   pszSymlink      The relative path to the symbolic link that should
    760  *                          be read.
    761  * @param   pszTarget       The target buffer.
    762  * @param   cbTarget        The size of the target buffer.
    763  * @param   fRead           Read flags, RTSYMLINKREAD_FLAGS_XXX.
    764  *
    765  * @sa      RTSymlinkRead
    766  */
     635    return rc;
     636}
     637
     638
    767639RTDECL(int) RTDirRelSymlinkRead(RTDIR hDir, const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead)
    768640{
     
    774646    int rc = rtDirRelBuildFullPath(pThis, szPath, sizeof(szPath), pszSymlink);
    775647    if (RT_SUCCESS(rc))
    776     {
    777 RTAssertMsg2("DBG: RTDirRelSymlinkRead(%s)...\n", szPath);
    778648        rc = RTSymlinkRead(szPath, pszTarget, cbTarget, fRead);
    779     }
    780     return rc;
    781 }
    782 
     649    return rc;
     650}
     651
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