📄 filesystem.h
字号:
// filesystem.h: interface for the filesystem class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FILESYSTEM_H__23CB4EE8_0BB8_4776_8DEA_461D18578CE9__INCLUDED_)
#define AFX_FILESYSTEM_H__23CB4EE8_0BB8_4776_8DEA_461D18578CE9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <windows.h>
#define DIR 1
#define F 0
struct fcb
{
char filename[40];
char extendname[8];
SYSTEMTIME createtime;
SYSTEMTIME lastmodifytime;
SYSTEMTIME readtime;
int firstblock;
int blocknums;
int size;
int type;//1表示目录,0表示文件
struct fcb *father;
struct fcb *child;
struct fcb *rightbrother;
};
struct block
{
};
struct mem
{
int state;
char dirname[2];
double size;
};
struct presentb//当前访问的分区
{
int p;
struct mem db[4];
};
struct dir_
{
int i;
char dir[100][20];
};
class filesystem
{
public:
int back(int first,int n);
void outFat();
void weishitu();
int spaceDistribute(int n);
int mohupipei(char ch[]);
void outputTree();
void outputUrl();
void run();
void outputTime(struct fcb *p);
int locateDir(int type);
int analysisCmd();
void exit_();
void help();
void getCmd();
void tree(struct fcb *predir,int n);
int rd();
int del();
int mk();
int md();
int dir();
int cd();
void init();
filesystem();
virtual ~filesystem();
protected:
// double freesize;//可用空间
struct presentb pd;//当前访问的分区
struct fcb *present,*front,*predir;//predir指向当前所处目录,present指向当前寻找的目录
struct fcb *root,*c,*d,*e,*f;
char cmd[100];
char file[20];
char url[100];
int cp;//指向命令字符
int dp;///指向当前分区号
int dc;
int fat[1000];//fat表
int space[1000];//位视图
struct dir_ dirs;
// struct commond cmd;
};
#endif // !defined(AFX_FILESYSTEM_H__23CB4EE8_0BB8_4776_8DEA_461D18578CE9__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -