-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinode.h
More file actions
35 lines (27 loc) · 722 Bytes
/
inode.h
File metadata and controls
35 lines (27 loc) · 722 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
#ifndef __INODE_H__
#define __INODE_H__
#include <string>
#include <vector>
#include <memory>
using std::shared_ptr;
using std::make_shared;
using std::string;
using std::vector;
class iNode{
string fileID;
unsigned int size; // Size of the file.
vector<int> locations;
shared_ptr<iNode> next;
public:
iNode(string fileID, unsigned int size, vector<int> locations);
~iNode() = default;
// Returns the locations/addresses of a file.
vector<int> getLocations();
// Returns the next iNode in the linked list.
shared_ptr<iNode> getNext();
// Sets the next iNode property of 'this'.
void setNext(shared_ptr<iNode> next);
string getFileID();
unsigned int getSize();
};
#endif