91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 17KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-01-03
  • 語言: C/C++
  • 標(biāo)簽: 杭電??

資源簡介

杭電 操作系統(tǒng)課程設(shè)計(jì) 簡單文件系統(tǒng)的實(shí)現(xiàn) 杭電 操作系統(tǒng)課程設(shè)計(jì) 簡單文件系統(tǒng)的實(shí)現(xiàn) 杭電 操作系統(tǒng)課程設(shè)計(jì) 簡單文件系統(tǒng)的實(shí)現(xiàn)

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
using?namespace?std;

//1代表普通文件2代表目錄文件0表示空文件
#define?GENERAL?1
#define?DIRECTORY?2
#define?HXSH?0

struct?FCB
{
char?fname[16];?//文件名
char?type;????
int?size;????//文件大小
int?fatherBlockNum;????//當(dāng)前的父目錄盤塊號(hào)
int?currentBlockNum;????//當(dāng)前的盤塊

void?initialize()
{
strcpy(fname“\0“);
type?=?HXSH;
size?=0;
fatherBlockNum?=?currentBlockNum?=?0;
}
};?

/*常量設(shè)置*/
const?char*?FilePath?=?“C:\\myfiles“;
const?int?BlockSize?=?512;???????//盤塊大小
const?int?OPEN_MAX?=?5;??????????//能打開最多的文件數(shù)
const?int?BlockCount?=?128;???//盤塊數(shù)
const?int?DiskSize?=?BlockSize*BlockCount;????//磁盤大小
const?int?BlockFcbCount?=?BlockSize/sizeof(FCB);//目錄文件的最多FCB數(shù)

int?OpenFileCount?=?0;

struct?OPENLIST??

評論

共有 條評論