| author | David Anderson <dvander@alliedmods.net> |
| Wed Apr 09 05:59:21 2008 +0000 (2008-04-09) | |
| changeset 1976 | fd2c6a89845d |
| parent 1952 | b7aa2b626807 |
| permissions | -rw-r--r-- |
| ds@1952 | 1 |
#ifndef _INCLUDE_FOLDER_LIST_H_ |
| ds@1952 | 2 |
#define _INCLUDE_FOLDER_LIST_H_ |
| ds@1952 | 3 |
|
| ds@1952 | 4 |
#include "platform_headers.h" |
| ds@1952 | 5 |
#include <list> |
| ds@1952 | 6 |
#include <vector> |
| ds@1952 | 7 |
|
| ds@1952 | 8 |
struct CFileListEntry |
| ds@1952 | 9 |
{ |
| ds@1952 | 10 |
TCHAR file[MAX_PATH]; |
| ds@1952 | 11 |
unsigned __int64 size; |
| ds@1952 | 12 |
}; |
| ds@1952 | 13 |
|
| ds@1952 | 14 |
class CFileList |
| ds@1952 | 15 |
{ |
| ds@1952 | 16 |
public: |
| ds@1952 | 17 |
CFileList(const TCHAR *name); |
| ds@1952 | 18 |
~CFileList(); |
| ds@1952 | 19 |
public: |
| ds@1952 | 20 |
CFileList *PeekCurrentFolder(); |
| ds@1952 | 21 |
void PopCurrentFolder(); |
| ds@1952 | 22 |
const TCHAR *PeekCurrentFile(); |
| ds@1952 | 23 |
void PopCurrentFile(); |
| ds@1952 | 24 |
const TCHAR *GetFolderName(); |
| ds@1952 | 25 |
public: |
| ds@1952 | 26 |
void AddFolder(CFileList *pFileList); |
| ds@1952 | 27 |
void AddFile(const TCHAR *name, unsigned __int64 size); |
| ds@1952 | 28 |
unsigned __int64 GetRecursiveSize(); |
| ds@1952 | 29 |
public: |
| ds@1952 | 30 |
static CFileList *BuildFileList(const TCHAR *name, const TCHAR *root_folder); |
| ds@1952 | 31 |
private: |
| ds@1952 | 32 |
std::list<CFileList *> m_folder_list; |
| ds@1952 | 33 |
std::list<CFileListEntry> m_file_list; |
| ds@1952 | 34 |
TCHAR m_FolderName[MAX_PATH]; |
| ds@1952 | 35 |
unsigned __int64 m_TotalSize; |
| ds@1952 | 36 |
unsigned __int64 m_RecursiveSize; |
| ds@1952 | 37 |
bool m_bGotRecursiveSize; |
| ds@1952 | 38 |
}; |
| ds@1952 | 39 |
|
| ds@1952 | 40 |
#endif //_INCLUDE_FOLDER_LIST_H_ |