📄 define.h
字号:
#include<iostream.h>
#include<windows.h>
#include<fstream.h>
#include <stdio.h>
#include <io.h>
int del(char *);
void Del_Dir(int,int);
void help();
#define Block_Size 1024 //磁盘块1k
#define Block_Num 102400 //磁盘块数102400块
#define Inode_Num 1024 //文件和目录最大数目1024
struct inode
{ int decide; //判断是文件还是目录,4byte;0为目录,1为文件
char name[28]; //文件/目录名,28byte
int First_Block; //所占用的第一块磁盘块地址,4byte
int length; //文件内容长度,4byte
int index; //在inode区中的编号,4byte
int parent; //父索引节点,4byte
int Child_Num; //子节点个数,4byte
int child[15]; //子索引节点,15*4=60byte
SYSTEMTIME ctime; //文件创建时间,16byte
};
//128byte
struct Super_Block
{
int Free_Inode;
int Free_Block;
};
//8byte
/*位图中为0表示空闲,为1表示已被占用*/
int Inode_Bitmap[Inode_Num]; //i节点位图,4k
int Block_Bitmap[Block_Num]; //磁盘块位图,400k
struct inode Inode[Inode_Num]; //inode区,128k
struct Super_Block super; //超级块
int curr; //当前索引值
struct inode* Curr_Inode; //当前inode索引指针
char current[512]; //当前路径
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -