diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
|---|---|---|
| committer | <> | 2014-05-08 15:03:54 +0000 |
| commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
| tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Runtime/include/internal/dir.h | |
| parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
| download | VirtualBox-master.tar.gz | |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Runtime/include/internal/dir.h')
| -rw-r--r-- | src/VBox/Runtime/include/internal/dir.h | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/src/VBox/Runtime/include/internal/dir.h b/src/VBox/Runtime/include/internal/dir.h index 987fe32a..8a85a1e6 100644 --- a/src/VBox/Runtime/include/internal/dir.h +++ b/src/VBox/Runtime/include/internal/dir.h @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2011 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -83,23 +83,55 @@ typedef struct RTDIR #endif /** The length of the converted filename. */ size_t cchName; + /** The size of this structure. */ + size_t cbSelf; -#ifdef RT_OS_WINDOWS +#ifndef RTDIR_AGNOSTIC +# ifdef RT_OS_WINDOWS /** Handle to the opened directory search. */ HANDLE hDir; +# ifndef RT_USE_NATIVE_NT /** Find data buffer. * fDataUnread indicates valid data. */ WIN32_FIND_DATAW Data; - -#else /* 'POSIX': */ +# else + /** The size of the name buffer pszName points to. */ + size_t cbNameAlloc; + /** NT filter string. */ + UNICODE_STRING NtFilterStr; + /** Pointer to NtFilterStr if applicable, otherwise NULL. */ + PUNICODE_STRING pNtFilterStr; + /** The information class we're using. */ + FILE_INFORMATION_CLASS enmInfoClass; + /** Object directory context data. */ + ULONG uObjDirCtx; + /** Pointer to the current data entry in the buffer. */ + union + { + /** Both file names, no file ID. */ + PFILE_BOTH_DIR_INFORMATION pBoth; + /** Both file names with file ID. */ + PFILE_ID_BOTH_DIR_INFORMATION pBothId; + /** Object directory info. */ + POBJECT_DIRECTORY_INFORMATION pObjDir; + /** Unsigned view. */ + uintptr_t u; + } uCurData; + /** The amount of valid data in the buffer. */ + uint32_t cbBuffer; + /** The allocate buffer size. */ + uint32_t cbBufferAlloc; + /** Find data buffer containing multiple directory entries. + * fDataUnread indicates valid data. */ + uint8_t *pabBuffer; +# endif +# else /* 'POSIX': */ /** What opendir() returned. */ DIR *pDir; - /** The max size of the d_name member. - * This includes the 0 terminator of course.*/ - size_t cbMaxName; /** Find data buffer. * fDataUnread indicates valid data. */ struct dirent Data; +# endif #endif } RTDIR; @@ -130,4 +162,12 @@ DECLINLINE(bool) rtDirValidHandle(PRTDIR pDir) */ int rtDirNativeOpen(PRTDIR pDir, char *pszPathBuf); +/** + * Returns the size of the directory structure. + * + * @returns The size in bytes. + * @param pszPath The path to the directory we're about to open. + */ +size_t rtDirNativeGetStructSize(const char *pszPath); + #endif |
