caef83c45c17f4986a3fc8838769a64d7a1e7606
[pintos-anon] / src / filesys / filesys.h
1 #ifndef FILESYS_FILESYS_H
2 #define FILESYS_FILESYS_H
3
4 #include <stdbool.h>
5 #include "filesys/off_t.h"
6
7 /* Sectors of system file inodes. */
8 #define FREE_MAP_SECTOR 0       /* Free map file inode sector. */
9 #define ROOT_DIR_SECTOR 1       /* Root directory file inode sector. */
10
11 /* Disk used for file system. */
12 extern struct disk *filesys_disk;
13
14 void filesys_init (bool format);
15 void filesys_done (void);
16 bool filesys_create (const char *name, off_t initial_size);
17 struct file *filesys_open (const char *name);
18 bool filesys_remove (const char *name);
19
20 #endif /* filesys/filesys.h */