-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfs.h
More file actions
47 lines (39 loc) · 1.22 KB
/
fs.h
File metadata and controls
47 lines (39 loc) · 1.22 KB
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
43
44
45
46
47
#ifndef _FS_H_
#define _FS_H_
typedef unsigned long BytesCnt;
typedef unsigned long EntryNum;
const unsigned long ENTRYCNT = 64;
const unsigned int FNAMELEN = 8;
const unsigned int FEXTLEN = 3;
struct Entry {
char name[FNAMELEN];
char ext[FEXTLEN];
char reserved;
unsigned long indexCluster;
unsigned long size;
};
typedef Entry Directory[ENTRYCNT];
class KernelFS;
class Partition;
class File;
class FS {
public:
~FS();
static char mount(Partition* partition); //montira particiju
// vraca dodeljeno slovo
static char unmount(char part); //demontira particiju oznacenu datim
// slovom vraca 0 u slucaju neuspeha ili 1 u slucaju uspeha
static char format(char part); //particija zadatu slovom se formatira;
// vraca 0 u slucaju neuspeha ili 1 u slucaju uspeha
static char readRootDir(char part, EntryNum n, Directory &d);
//prvim argumentom se zadaje particija, drugim redni broj
//validnog ulaza od kog se po?inje ?itanje
static char doesExist(char* fname); //argument je naziv fajla sa
//apsolutnom putanjom
static File* open(char* fname, char mode);
static char deleteFile(char* fname);
protected:
FS();
static KernelFS *myImpl;
};
#endif