1 #ifndef _CLOUDFILELIST_H
2 #define _CLOUDFILELIST_H
4 #include "fileModel\FileDescriptor.h"
11 list<FileDescriptor*>* getFileTree() {
18 std::ofstream out(persPath);
19 char separator =
'\n';
21 out << fileTree.size();
29 long fSize = fd->getSize();
31 cout <<
"SIZE NOT SET!";
54 std::ifstream in(persPath);
65 getline(in, fileTreeSize);
66 IfileTreeSize = stoi(fileTreeSize);
68 for (
int i = 0; i < IfileTreeSize; i++){
72 getline(in, fileSize);
73 IfileSize = stol(fileSize);
74 row->setSize(IfileSize);
76 getline(in, fragSize);
77 IfragSize = stoi(fragSize);
78 vector<Fragment>* fragments =
new vector<Fragment>;
79 for (
int j = 0; j < IfragSize; j++){
80 getline(in, cloudFileID);
83 fragments->push_back(*(f));
86 fileTree.push_back(row);
92 void setPersPath(
string _p){
98 list<FileDescriptor*> fileTree;
102 #endif //_CLOUDFILELIST_H
string getCloudFileID()
Definition: CloudFile.cpp:19
Definition: FileDescriptor.h:17
string getFileID()
Definition: FileDescriptor.cpp:31
vector< Fragment > getFragments()
Definition: FileDescriptor.cpp:36
string getCloudId()
Definition: CloudFile.cpp:14
Definition: Fragment.h:10
void setFragments(vector< Fragment > _fragments)
Definition: FileDescriptor.cpp:26
Definition: CloudFileList.h:9