Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cFileFind Class Reference

#include <cFileDir.h>

Public Member Functions

 cFileFind (cStringF sDirPath="", DWORD nFileFlags=0) noexcept
 
 ~cFileFind ()
 
cStringF get_DirPath () const noexcept
 
cStringF GetFilePath (const FILECHAR_t *pszFileTitle) const
 
cStringF get_FilePath () const
 
bool isDots () const noexcept
 
HRESULT FindOpen (const FILECHAR_t *pszDirPath=nullptr, const FILECHAR_t *pszWildcardFile=nullptr)
 
HRESULT FindFile (const FILECHAR_t *pszDirPath=nullptr, const FILECHAR_t *pszWildcardFile=nullptr)
 
HRESULT FindFileNext (bool bFirst=false)
 
bool isContextOpen () const
 
void CloseContext ()
 

Public Attributes

cFileFindEntry m_FileEntry
 The current entry. by calls to FindFile() and FindFileNext() More...
 

Detailed Description

Read/Browse/Enumerate directory in ongoing/serial state. use FindFileNext() to get next file. Similar to MFC CFileFind.

Note
Don't delete files while reading here. no idea what effect that has. Use cFileDir.

Constructor & Destructor Documentation

◆ cFileFind()

Gray::cFileFind::cFileFind ( cStringF  sDirPath = "",
DWORD  nFileFlags = 0 
)
explicitnoexcept

◆ ~cFileFind()

Gray::cFileFind::~cFileFind ( )
inline

Member Function Documentation

◆ CloseContext()

void Gray::cFileFind::CloseContext ( )

◆ FindFile()

HRESULT Gray::cFileFind::FindFile ( const FILECHAR_t pszDirPath = nullptr,
const FILECHAR_t pszWildcardFile = nullptr 
)

Start a sequential read of the files in a list of possible matches.

◆ FindFileNext()

HRESULT Gray::cFileFind::FindFileNext ( bool  bFirst = false)

Read the next file in the directory list. ASSUME cFileFind::FindFile() was called.

Returns
HRESULT_WIN32_C(ERROR_NO_MORE_ITEMS) = no more files
Note
UNICODE files are converted to '?' chars if calling the non UNICODE version.

◆ FindOpen()

HRESULT Gray::cFileFind::FindOpen ( const FILECHAR_t pszDirPath = nullptr,
const FILECHAR_t pszWildcardFile = nullptr 
)

start a sequential read of the files in a list of possible matches.

  • pszWildcardFile = "*.ext". if pszDirPath is empty, full path can be in pszWildcardFile
    Note
    pszWildcardFile can NOT have multiple "*.ext1;*.ext2"
    Returns
    HRESULT_WIN32_C(ERROR_NO_MORE_ITEMS) = no files.

◆ get_DirPath()

cStringF Gray::cFileFind::get_DirPath ( ) const
inlinenoexcept

◆ get_FilePath()

cStringF Gray::cFileFind::get_FilePath ( ) const
inline

Get Full file path. like MFC CFileFind::GetFilePath()

◆ GetFilePath()

cStringF Gray::cFileFind::GetFilePath ( const FILECHAR_t pszFileTitle) const
inline

Create a full file path with directory and file name/title.

◆ isContextOpen()

bool Gray::cFileFind::isContextOpen ( ) const

◆ isDots()

bool Gray::cFileFind::isDots ( ) const
inlinenoexcept

Member Data Documentation

◆ m_FileEntry

cFileFindEntry Gray::cFileFind::m_FileEntry

The current entry. by calls to FindFile() and FindFileNext()


The documentation for this class was generated from the following files: