Changeset 99758 in vbox for trunk/src/VBox/Runtime/r3/generic
- Timestamp:
- May 11, 2023 9:37:59 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/generic/dirrel-r3-generic.cpp
r98103 r99758 118 118 119 119 120 /**121 * Open a file relative to @a hDir.122 *123 * @returns IPRT status code.124 * @param hDir The directory to open relative to.125 * @param pszRelFilename The relative path to the file.126 * @param fOpen Open flags, i.e a combination of the RTFILE_O_XXX127 * defines. The ACCESS, ACTION and DENY flags are128 * mandatory!129 * @param phFile Where to store the handle to the opened file.130 *131 * @sa RTFileOpen132 */133 120 RTDECL(int) RTDirRelFileOpen(RTDIR hDir, const char *pszRelFilename, uint64_t fOpen, PRTFILE phFile) 134 121 { … … 158 145 159 146 160 /**161 * Opens a directory relative to @a hDir.162 *163 * @returns IPRT status code.164 * @param hDir The directory to open relative to.165 * @param pszDir The relative path to the directory to open.166 * @param phDir Where to store the directory handle.167 *168 * @sa RTDirOpen169 */170 147 RTDECL(int) RTDirRelDirOpen(RTDIR hDir, const char *pszDir, RTDIR *phDir) 171 148 { … … 183 160 184 161 185 /**186 * Opens a directory relative to @a hDir, with flags and optional filtering.187 *188 * @returns IPRT status code.189 * @param hDir The directory to open relative to.190 * @param pszDirAndFilter The relative path to the directory to search, this191 * must include wildcards.192 * @param enmFilter The kind of filter to apply. Setting this to193 * RTDIRFILTER_NONE makes this function behave like194 * RTDirOpen.195 * @param fFlags Open flags, RTDIR_F_XXX.196 * @param phDir Where to store the directory handle.197 *198 * @sa RTDirOpenFiltered199 */200 162 RTDECL(int) RTDirRelDirOpenFiltered(RTDIR hDir, const char *pszDirAndFilter, RTDIRFILTER enmFilter, 201 163 uint32_t fFlags, RTDIR *phDir) … … 213 175 214 176 215 /**216 * Creates a directory relative to @a hDir.217 *218 * @returns IPRT status code.219 * @param hDir The directory @a pszRelPath is relative to.220 * @param pszRelPath The relative path to the directory to create.221 * @param fMode The mode of the new directory.222 * @param fCreate Create flags, RTDIRCREATE_FLAGS_XXX.223 * @param phSubDir Where to return the handle of the created directory.224 * Optional.225 *226 * @sa RTDirCreate227 */228 177 RTDECL(int) RTDirRelDirCreate(RTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fCreate, RTDIR *phSubDir) 229 178 { … … 244 193 245 194 246 /**247 * Removes a directory relative to @a hDir if empty.248 *249 * @returns IPRT status code.250 * @param hDir The directory @a pszRelPath is relative to.251 * @param pszRelPath The relative path to the directory to remove.252 *253 * @sa RTDirRemove254 */255 195 RTDECL(int) RTDirRelDirRemove(RTDIR hDir, const char *pszRelPath) 256 196 { … … 277 217 278 218 279 /**280 * Query information about a file system object relative to @a hDir.281 *282 * @returns IPRT status code.283 * @retval VINF_SUCCESS if the object exists, information returned.284 * @retval VERR_PATH_NOT_FOUND if any but the last component in the specified285 * path was not found or was not a directory.286 * @retval VERR_FILE_NOT_FOUND if the object does not exist (but path to the287 * parent directory exists).288 *289 * @param hDir The directory @a pszRelPath is relative to.290 * @param pszRelPath The relative path to the file system object.291 * @param pObjInfo Object information structure to be filled on successful292 * return.293 * @param enmAddAttr Which set of additional attributes to request.294 * Use RTFSOBJATTRADD_NOTHING if this doesn't matter.295 * @param fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.296 *297 * @sa RTPathQueryInfoEx298 */299 219 RTDECL(int) RTDirRelPathQueryInfo(RTDIR hDir, const char *pszRelPath, PRTFSOBJINFO pObjInfo, 300 220 RTFSOBJATTRADD enmAddAttr, uint32_t fFlags) … … 312 232 313 233 314 /**315 * Changes the mode flags of a file system object relative to @a hDir.316 *317 * The API requires at least one of the mode flag sets (Unix/Dos) to318 * be set. The type is ignored.319 *320 * @returns IPRT status code.321 * @param hDir The directory @a pszRelPath is relative to.322 * @param pszRelPath The relative path to the file system object.323 * @param fMode The new file mode, see @ref grp_rt_fs for details.324 * @param fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.325 *326 * @sa RTPathSetMode327 */328 234 RTDECL(int) RTDirRelPathSetMode(RTDIR hDir, const char *pszRelPath, RTFMODE fMode, uint32_t fFlags) 329 235 { … … 348 254 349 255 350 /**351 * Changes one or more of the timestamps associated of file system object352 * relative to @a hDir.353 *354 * @returns IPRT status code.355 * @param hDir The directory @a pszRelPath is relative to.356 * @param pszRelPath The relative path to the file system object.357 * @param pAccessTime Pointer to the new access time.358 * @param pModificationTime Pointer to the new modification time.359 * @param pChangeTime Pointer to the new change time. NULL if not to be changed.360 * @param pBirthTime Pointer to the new time of birth. NULL if not to be changed.361 * @param fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.362 *363 * @remark The file system might not implement all these time attributes,364 * the API will ignore the ones which aren't supported.365 *366 * @remark The file system might not implement the time resolution367 * employed by this interface, the time will be chopped to fit.368 *369 * @remark The file system may update the change time even if it's370 * not specified.371 *372 * @remark POSIX can only set Access & Modification and will always set both.373 *374 * @sa RTPathSetTimesEx375 */376 256 RTDECL(int) RTDirRelPathSetTimes(RTDIR hDir, const char *pszRelPath, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, 377 257 PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime, uint32_t fFlags) … … 389 269 390 270 391 /**392 * Changes the owner and/or group of a file system object relative to @a hDir.393 *394 * @returns IPRT status code.395 * @param hDir The directory @a pszRelPath is relative to.396 * @param pszRelPath The relative path to the file system object.397 * @param uid The new file owner user id. Pass NIL_RTUID to leave398 * this unchanged.399 * @param gid The new group id. Pass NIL_RTGID to leave this400 * unchanged.401 * @param fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.402 *403 * @sa RTPathSetOwnerEx404 */405 271 RTDECL(int) RTDirRelPathSetOwner(RTDIR hDir, const char *pszRelPath, uint32_t uid, uint32_t gid, uint32_t fFlags) 406 272 { … … 424 290 425 291 426 /**427 * Renames a directory relative path within a filesystem.428 *429 * This will rename symbolic links. If RTPATHRENAME_FLAGS_REPLACE is used and430 * pszDst is a symbolic link, it will be replaced and not its target.431 *432 * @returns IPRT status code.433 * @param hDirSrc The directory the source path is relative to.434 * @param pszSrc The source path, relative to @a hDirSrc.435 * @param hDirDst The directory the destination path is relative to.436 * @param pszDst The destination path, relative to @a hDirDst.437 * @param fRename Rename flags, RTPATHRENAME_FLAGS_XXX.438 *439 * @sa RTPathRename440 */441 292 RTDECL(int) RTDirRelPathRename(RTDIR hDirSrc, const char *pszSrc, RTDIR hDirDst, const char *pszDst, unsigned fRename) 442 293 { … … 465 316 466 317 467 /**468 * Removes the last component of the directory relative path.469 *470 * @returns IPRT status code.471 * @param hDir The directory @a pszRelPath is relative to.472 * @param pszRelPath The relative path to the file system object.473 * @param fUnlink Unlink flags, RTPATHUNLINK_FLAGS_XXX.474 *475 * @sa RTPathUnlink476 */477 318 RTDECL(int) RTDirRelPathUnlink(RTDIR hDir, const char *pszRelPath, uint32_t fUnlink) 478 319 { … … 499 340 500 341 501 /**502 * Creates a symbolic link (@a pszSymlink) relative to @a hDir targeting @a503 * pszTarget.504 *505 * @returns IPRT status code.506 * @param hDir The directory @a pszSymlink is relative to.507 * @param pszSymlink The relative path of the symbolic link.508 * @param pszTarget The path to the symbolic link target. This is509 * relative to @a pszSymlink or an absolute path.510 * @param enmType The symbolic link type. For Windows compatability511 * it is very important to set this correctly. When512 * RTSYMLINKTYPE_UNKNOWN is used, the API will try513 * make a guess and may attempt query information514 * about @a pszTarget in the process.515 * @param fCreate Create flags, RTSYMLINKCREATE_FLAGS_XXX.516 *517 * @sa RTSymlinkCreate518 */519 342 RTDECL(int) RTDirRelSymlinkCreate(RTDIR hDir, const char *pszSymlink, const char *pszTarget, 520 343 RTSYMLINKTYPE enmType, uint32_t fCreate) … … 532 355 533 356 534 /**535 * Read the symlink target relative to @a hDir.536 *537 * @returns IPRT status code.538 * @retval VERR_NOT_SYMLINK if @a pszSymlink does not specify a symbolic link.539 * @retval VERR_BUFFER_OVERFLOW if the link is larger than @a cbTarget. The540 * buffer will contain what all we managed to read, fully terminated541 * if @a cbTarget > 0.542 *543 * @param hDir The directory @a pszSymlink is relative to.544 * @param pszSymlink The relative path to the symbolic link that should545 * be read.546 * @param pszTarget The target buffer.547 * @param cbTarget The size of the target buffer.548 * @param fRead Read flags, RTSYMLINKREAD_FLAGS_XXX.549 *550 * @sa RTSymlinkRead551 */552 357 RTDECL(int) RTDirRelSymlinkRead(RTDIR hDir, const char *pszSymlink, char *pszTarget, size_t cbTarget, uint32_t fRead) 553 358 {
Note:
See TracChangeset
for help on using the changeset viewer.