-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileSystem.h
More file actions
26 lines (22 loc) · 739 Bytes
/
FileSystem.h
File metadata and controls
26 lines (22 loc) · 739 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
#include <stdio.h>
#include <stdint.h>
typedef struct {
char name[5]; // Name of the file or directory
uint8_t used_size; // Inode state and the size of the file or directory
uint8_t start_block; // Index of the start file block
uint8_t dir_parent; // Inode mode and the index of the parent inode
} Inode;
typedef struct {
char free_block_list[16];
Inode inode[126];
} Super_block;
void fs_mount(char *new_disk_name);
void fs_create(char name[5], int size);
void fs_delete(char name[5]);
void fs_read(char name[5], int block_num);
void fs_write(char name[5], int block_num);
void fs_buff(uint8_t buff[1024]);
void fs_ls(void);
void fs_resize(char name[5], int new_size);
void fs_defrag(void);
void fs_cd(char name[5]);