sourcemod/tools/installer/CFileList.h
David Anderson 61673e10f6 file copying now works, dialogs re-display at their last location, fixed up a bunch of interface mistakes, etc
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401728
2007-11-25 04:46:18 +00:00

41 lines
950 B
C++

#ifndef _INCLUDE_FOLDER_LIST_H_
#define _INCLUDE_FOLDER_LIST_H_
#include "platform_headers.h"
#include <list>
#include <vector>
struct CFileListEntry
{
TCHAR file[MAX_PATH];
unsigned __int64 size;
};
class CFileList
{
public:
CFileList(const TCHAR *name);
~CFileList();
public:
CFileList *PeekCurrentFolder();
void PopCurrentFolder();
const TCHAR *PeekCurrentFile();
void PopCurrentFile();
const TCHAR *GetFolderName();
public:
void AddFolder(CFileList *pFileList);
void AddFile(const TCHAR *name, unsigned __int64 size);
unsigned __int64 GetRecursiveSize();
public:
static CFileList *BuildFileList(const TCHAR *name, const TCHAR *root_folder);
private:
std::list<CFileList *> m_folder_list;
std::list<CFileListEntry> m_file_list;
TCHAR m_FolderName[MAX_PATH];
unsigned __int64 m_TotalSize;
unsigned __int64 m_RecursiveSize;
bool m_bGotRecursiveSize;
};
#endif //_INCLUDE_FOLDER_LIST_H_