Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

66 lines
1.8 KiB

//+-------------------------------------------------------------------
//
// File: FileEnum.hxx
//
// Contents: class encapsulating file enumeration
//
// Classes: CFileEnumurate
//
// History: Nov-93 Created DaveMont
//
//--------------------------------------------------------------------
#ifndef __FileEnumerate__
#define __FileEnumerate__
#include "t2.hxx"
class CFileEnumerate;
//+-------------------------------------------------------------------
//
// Class: CFileEnumurate
//
// Purpose: encapsulation of File enumeration, this class takes
// a path/filename with wildcards and a depth option,
// and provides init and next methods to allow iteration
// thru all the files specfied by the input path/filename and
// depth option
//
//--------------------------------------------------------------------
class CFileEnumerate
{
public:
CFileEnumerate(BOOL fdeep);
~CFileEnumerate();
ULONG Init(LPCWSTR filename, LPWSTR *wfilename, BOOL *fdir);
ULONG Next(LPWSTR *wfilename, BOOL *fdir);
private:
ULONG _ialize(LPCWSTR winfilename, LPWSTR *wfilename, BOOL *fdir);
ULONG _NextLocal(LPWSTR *wfilename, BOOL *fdir);
ULONG _NextDir(LPWSTR *wfilename, BOOL *fdir);
ULONG _InitDir(LPWSTR *wfilename, BOOL *fdir);
ULONG _DownDir(LPWSTR *wfilename, BOOL *fdir);
WCHAR _wpath[MAX_PATH] ;
WCHAR _wwildcards[MAX_PATH] ;
LPWSTR _pwfileposition ;
HANDLE _handle ;
WIN32_FIND_DATA _wfd ;
BOOL _froot; // root takes special handling
BOOL _fdeep;
BOOL _findeep;
BOOL _fcannotaccess;
CFileEnumerate * _pcfe ;
};
#endif // __FileEnumerate__