-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileSystem.hpp
42 lines (30 loc) · 780 Bytes
/
FileSystem.hpp
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
39
40
41
42
#pragma once
#include "Tag.hpp"
#include "FileIdentifier.hpp"
#include <vector>
class FileSetDesc;
class FileEntry;
class FileSystem {
private:
bool debug;
extend_ad location;
int block_size;
int fd;
FileSetDesc *root;
FileEntry *current_node;
FileEntry *root_node;
template<typename T>
T *loadDescriptor(Tag::Type type);
public:
FileSystem(const extend_ad &from, int block_size, int fd);
Tag getTagSector(int);
bool goTo(uint32_t sector);
bool loadRoot();
bool loadFirstDir();
charspec getCharset() const;
FileEntry *getCurrentNode();
void setCurrentNode(FileEntry *fe);
bool move(const std::string &name);
bool copy(const std::string &name, int fd_target);
std::vector<FileIdentifier::InfoDir*> getDirInfo();
};