VirtualBox

Changeset 69757 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Nov 19, 2017 3:15:36 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119157
Message:

iprt/dir.h: Added RTDirReadExA and RTDirReadExAFree for avoiding duplicating buffer management everywhere.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r69756 r69757  
    448448
    449449/**
     450 * Wrapper around RTDirReadEx that does the directory entry buffer handling.
     451 *
     452 * Call RTDirReadExAFree to free the buffers allocated by this function.
     453 *
     454 * @returns IPRT status code, see RTDirReadEx() for details.
     455 *
     456 * @param   hDir        Handle to the open directory.
     457 * @param   ppDirEntry  Pointer to the directory entry pointer.  Initialize this
     458 *                      to NULL before the first call.
     459 * @param   pcbDirEntry Where the API caches the allocation size.  Set this to
     460 *                      zero before the first call.
     461 * @param   enmAddAttr  See RTDirReadEx.
     462 * @param   fFlags      See RTDirReadEx.
     463 */
     464RTDECL(int) RTDirReadExA(RTDIR hDir, PRTDIRENTRYEX *ppDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAddAttr, uint32_t fFlags);
     465
     466/**
     467 * Frees the buffer allocated by RTDirReadExA.
     468 *
     469 * @param   ppDirEntry  Pointer to the directory entry pointer.
     470 * @param   pcbDirEntry Where the API caches the allocation size.
     471 */
     472RTDECL(void) RTDirReadExAFree(PRTDIRENTRYEX *ppDirEntry, size_t *pcbDirEntry);
     473
     474/**
    450475 * Resolves RTDIRENTRYTYPE_UNKNOWN values returned by RTDirRead.
    451476 *
  • trunk/include/iprt/mangling.h

    r69745 r69757  
    767767# define RTDirRead                                      RT_MANGLER(RTDirRead)
    768768# define RTDirReadEx                                    RT_MANGLER(RTDirReadEx)
     769# define RTDirReadExA                                   RT_MANGLER(RTDirReadExA)
     770# define RTDirReadExAFree                               RT_MANGLER(RTDirReadExAFree)
    769771# define RTDirRemove                                    RT_MANGLER(RTDirRemove)
    770772# define RTDirRemoveRecursive                           RT_MANGLER(RTDirRemoveRecursive)
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