|
uLib
User mode C/C++ extended API library for Win32 programmers.
|
#include <uLib/FileDir.h>
File entry. LIST_ENTRY descendant. Subject of DLinkList.
These entries are created by DirEntry::Scan(), via NewFileEntry().
Scan() is invoked by DirEntry::ScanDir(), the main call point.
Public Data | |
| CSTR | Name |
| CSTR | Ext |
| PDirEntry | pDir |
| PVOID | pData |
Public Data inherited from LIST_ENTRY | |
| struct _LIST_ENTRY * | Flink |
| struct _LIST_ENTRY * | Blink |
Static Public Attributes | |
| static PFnFileAddAction | AddAction = NULL |
| static PFnFileAction | DelAction = NULL |
Public Functions | |
| FileEntry (LPWIN32_FIND_DATA pFd, PDirEntry Dir, PScanDirCtx pCtx=NULL) | |
| FileEntry (CSTR Name, PDirEntry Dir, PScanDirCtx pCtx=NULL) | |
| virtual | ~FileEntry () |
| CSTR | Rename (CSTR newName) |
| UINT | GetPathName (TSTR Buffer, UINT BufLen) |
| bool | GetFindData (LPWIN32_FIND_DATA pData) |
| bool | RemoveFromParent () |
Static Public Member Functions | |
| static bool __stdcall | _delete (PLIST_ENTRY Entry, void *pData) |
| static bool __stdcall | _dump (PLIST_ENTRY Entry, void *pData) |
| FileEntry::FileEntry | ( | LPWIN32_FIND_DATA | pFd, |
| PDirEntry | Dir, | ||
| PScanDirCtx | pCtx = NULL |
||
| ) |
Normal constructor.
Definition at line 144 of file FileDir.cpp.
| FileEntry::FileEntry | ( | CSTR | Name, |
| PDirEntry | Dir, | ||
| PScanDirCtx | pCtx = NULL |
||
| ) |
Abbreviated constructor.
Definition at line 137 of file FileDir.cpp.
|
virtual |
Optionally calls your DelAction so you can perform any
additional clean-up, then deallocates internal entry data.
Definition at line 157 of file FileDir.cpp.
Rename updates Name and Ext ..
Note: The entry is only renamed in RAM, the file system isn't touched.
On failure Rename returns NULL, and Name/Ext are kept.
Definition at line 171 of file FileDir.cpp.
| UINT FileEntry::GetPathName | ( | TSTR | Buffer, |
| UINT | BufLen | ||
| ) |
GetPathName builds the full path name (from BaseDir).
Returns nr of chars copied to the buffer, or 0 on failure.
Definition at line 193 of file FileDir.cpp.
| bool FileEntry::GetFindData | ( | LPWIN32_FIND_DATA | pData | ) |
(Re)fetch the file system data for this entry.
Return true on success.
Definition at line 210 of file FileDir.cpp.
| bool FileEntry::RemoveFromParent | ( | ) |
Remove this entry from it's containing DLinkList.
Return true on success.
Definition at line 184 of file FileDir.cpp.
|
static |
_delete is used by DirEntry for recursive deletion.
[internal] It deletes this instance, but doesn't remove it from the parent's DirEntry::Files list.
Definition at line 164 of file FileDir.cpp.
|
static |
DLinkList::ForEach callback to dump file entry to debugger.
Definition at line 74 of file FileDir.cpp.
| CSTR FileEntry::Ext |
| PDirEntry FileEntry::pDir |
| PVOID FileEntry::pData |
|
static |
|
static |