-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfilesystemmodel.h
More file actions
38 lines (28 loc) · 891 Bytes
/
filesystemmodel.h
File metadata and controls
38 lines (28 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef FILESYSTEMMODEL_H
#define FILESYSTEMMODEL_H
#include "configurable.h"
#include "datamodel.h"
#include <vector>
class FileSystemModel : public DataModel, public Configurable
{
// Configurable interface
public:
virtual void setConfiguration(Configuration configuration) override;
// DataModel interface
public:
virtual int count() const override;
virtual std::string name(int index) const override;
virtual int size(int index) const override;
virtual bool isDir(int index) const override;
virtual void enter(int index) override;
virtual void up() override;
std::string rootDir() const;
private:
void setRootDir(const std::string &rootDir);
void enterDirectory(const std::string &path);
private:
std::string mRootDir;
std::string mCurrentDir;
std::vector<std::string> mListFilePathes;
};
#endif // FILESYSTEMMODEL_H