mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-08 06:08:12 -05:00
26 lines
677 B
C
26 lines
677 B
C
|
#include "retroshare/rsfiles.h"
|
||
|
|
||
|
class FileTreeImpl: public FileTree
|
||
|
{
|
||
|
public:
|
||
|
FileTreeImpl() {}
|
||
|
|
||
|
virtual std::string toRadix64() const ;
|
||
|
virtual bool getDirectoryContent(uint32_t index,std::vector<uint32_t>& subdirs,std::vector<FileData>& subfiles) const ;
|
||
|
virtual void print() const ;
|
||
|
|
||
|
bool serialise(unsigned char *& data,uint32_t& data_size) const ;
|
||
|
bool deserialise(unsigned char* data, uint32_t data_size) ;
|
||
|
|
||
|
protected:
|
||
|
void recurs_print(uint32_t index,const std::string& indent) const;
|
||
|
|
||
|
struct DirData {
|
||
|
std::string name;
|
||
|
std::vector<uint32_t> subdirs ;
|
||
|
std::vector<uint32_t> subfiles ;
|
||
|
};
|
||
|
std::vector<FileData> mFiles ;
|
||
|
std::vector<DirData> mDirs ;
|
||
|
};
|