VirtualBox

Changeset 67186 in vbox for trunk/include


Ignore:
Timestamp:
Jun 1, 2017 6:39:08 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115863
Message:

IPRT: Added RTVfsFsStrmToNormalDir, RTVfsFsStrmToDirUndo, RTVfsDirOpenFileAsIoStream, and RTVfsFsStreamToPrivate.

Location:
trunk/include/iprt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/mangling.h

    r67180 r67186  
    23112311# define RTVfsDirOpenDir                                RT_MANGLER(RTVfsDirOpenDir)
    23122312# define RTVfsDirOpenFile                               RT_MANGLER(RTVfsDirOpenFile)
     2313# define RTVfsDirOpenFileAsIoStream                     RT_MANGLER(RTVfsDirOpenFileAsIoStream)
    23132314# define RTVfsDirQueryPathInfo                          RT_MANGLER(RTVfsDirQueryPathInfo)
    23142315# define RTVfsDirReadEx                                 RT_MANGLER(RTVfsDirReadEx)
     
    23332334# define RTVfsFileWrite                                 RT_MANGLER(RTVfsFileWrite)
    23342335# define RTVfsFileWriteAt                               RT_MANGLER(RTVfsFileWriteAt)
     2336# define RTVfsFsStreamToPrivate                         RT_MANGLER(RTVfsFsStreamToPrivate)
    23352337# define RTVfsFsStrmAdd                                 RT_MANGLER(RTVfsFsStrmAdd)
    23362338# define RTVfsFsStrmEnd                                 RT_MANGLER(RTVfsFsStrmEnd)
     
    23412343# define RTVfsFsStrmRetain                              RT_MANGLER(RTVfsFsStrmRetain)
    23422344# define RTVfsFsStrmRetainDebug                         RT_MANGLER(RTVfsFsStrmRetainDebug)
     2345# define RTVfsFsStrmToDir                               RT_MANGLER(RTVfsFsStrmToDir)
     2346# define RTVfsFsStrmToNormalDir                         RT_MANGLER(RTVfsFsStrmToNormalDir)
     2347# define RTVfsFsStrmToDirUndo                           RT_MANGLER(RTVfsFsStrmToDirUndo)
    23432348# define RTVfsIoStreamToPrivate                         RT_MANGLER(RTVfsIoStreamToPrivate)
    23442349# define RTVfsIoStrmFlush                               RT_MANGLER(RTVfsIoStrmFlush)
  • trunk/include/iprt/vfs.h

    r67180 r67186  
    448448 * @param   fOpen           RTFILE_O_XXX flags.
    449449 * @param   phVfsFile       Where to return the file.
     450 * @sa      RTVfsDirOpenFileAsIoStream
    450451 */
    451452RTDECL(int) RTVfsDirOpenFile(RTVFSDIR hVfsDir, const char *pszPath, uint64_t fOpen, PRTVFSFILE phVfsFile);
     453
     454/**
     455 * Convenience wrapper around RTVfsDirOpenFile that returns an I/O stream.
     456 *
     457 * @returns IPRT status code.
     458 * @param   hVfsDir         The VFS directory start walking the @a pszPath
     459 *                          relative to.
     460 * @param   pszPath         Path to the file.
     461 * @param   fOpen           RTFILE_O_XXX flags.
     462 * @param   phVfsIos        Where to return the I/O stream handle of the file.
     463 * @sa      RTVfsDirOpenFile
     464 */
     465RTDECL(int) RTVfsDirOpenFileAsIoStream(RTVFSDIR hVfsDir, const char *pszPath, uint64_t fOpen, PRTVFSIOSTREAM phVfsIos);
    452466
    453467/**
     
    13151329                                        PRTVFSFILE phVfsFile);
    13161330
     1331
     1332/**
     1333 * Create a file system stream for writing to a directory.
     1334 *
     1335 * This is just supposed to be a drop in replacement for the TAR creator stream
     1336 * that instead puts the files and stuff in a directory instead of a TAR
     1337 * archive.  In addition, it has an undo feature for simplying cleaning up after
     1338 * a botched run
     1339 *
     1340 * @returns IPRT status code.
     1341 * @param   hVfsBaseDir The base directory.
     1342 * @param   fFlags      RTVFSFSS2DIR_F_XXX
     1343 * @param   phVfsFss    Where to return the FSS handle.
     1344 * @sa      RTVfsFsStrmToNormalDir, RTVfsFsStrmToDirUndo
     1345 */
     1346RTDECL(int) RTVfsFsStrmToDir(RTVFSDIR hVfsBaseDir, uint32_t fFlags, PRTVFSFSSTREAM phVfsFss);
     1347
     1348/**
     1349 * Create a file system stream for writing to a normal directory.
     1350 *
     1351 * This is just supposed to be a drop in replacement for the TAR creator stream
     1352 * that instead puts the files and stuff in a directory instead of a TAR
     1353 * archive.  In addition, it has an undo feature for simplying cleaning up after
     1354 * a botched run
     1355 *
     1356 * @returns IPRT status code.
     1357 * @param   pszBaseDir  The base directory.  Must exist.
     1358 * @param   fFlags      RTVFSFSS2DIR_F_XXX
     1359 * @param   phVfsFss    Where to return the FSS handle.
     1360 * @sa      RTVfsFsStrmToDir, RTVfsFsStrmToDirUndo
     1361 */
     1362RTDECL(int) RTVfsFsStrmToNormalDir(const char *pszBaseDir, uint32_t fFlags, PRTVFSFSSTREAM phVfsFss);
     1363
     1364/** @name RTVFSFSS2DIR_F_XXX - Flags for RTVfsFsStrmToNormalDir
     1365 * @{ */
     1366/** Overwrite existing files (default is to not overwrite anything). */
     1367#define RTVFSFSS2DIR_F_OVERWRITE_FILES      RT_BIT_32(0)
     1368/** Valid bits.   */
     1369#define RTVFSFSS2DIR_F_VALID_MASK           UINT32_C(0x00000001)
     1370/** @} */
     1371
     1372/**
     1373 * Deletes files, directories, symlinks and stuff created by a FSS returned by
     1374 * RTVfsFsStrmToNormalDir or RTVfsFsStrmToDir.
     1375 *
     1376 * @returns IPRT status code.
     1377 * @param   hVfsFss     The write-to-directory FSS handle.
     1378 */
     1379RTDECL(int) RTVfsFsStrmToDirUndo(RTVFSFSSTREAM hVfsFss);
     1380
     1381
     1382
    13171383/** @}  */
    13181384
  • trunk/include/iprt/vfslowlevel.h

    r67166 r67186  
    490490RTDECL(int) RTVfsNewFsStream(PCRTVFSFSSTREAMOPS pFsStreamOps, size_t cbInstance, RTVFS hVfs, RTVFSLOCK hLock, bool fReadOnly,
    491491                             PRTVFSFSSTREAM phVfsFss, void **ppvInstance);
     492
     493/**
     494 * Gets the private data of an filesystem stream.
     495 *
     496 * @returns Pointer to the private data.  NULL if the handle is invalid in some
     497 *          way.
     498 * @param   hVfsFss             The FS stream handle.
     499 * @param   pFsStreamOps        The FS stream operations.  This servers as a
     500 *                              sort of password.
     501 */
     502RTDECL(void *) RTVfsFsStreamToPrivate(RTVFSFSSTREAM hVfsFss, PCRTVFSFSSTREAMOPS pFsStreamOps);
    492503
    493504
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