-
大小: 318KB文件類型: .rar金幣: 2下載: 1 次發(fā)布日期: 2021-01-03
- 語言: Java
- 標(biāo)簽: 操作系統(tǒng)??C語言??文件管理??
資源簡介
用C語言(或其它語言,如Java)實(shí)現(xiàn)一個(gè)簡單的二級文件系統(tǒng)設(shè)計(jì),加深對文件系統(tǒng)的內(nèi)部功能和內(nèi)部實(shí)現(xiàn)的理解。要求模擬采用二級目錄結(jié)構(gòu)的磁盤文件系統(tǒng)的文件操作, 實(shí)現(xiàn)用戶的創(chuàng)建、查詢、登錄、刪除,和文件的添加、刪除、打開、關(guān)閉、讀、寫等基本命令,用在屏幕上輸入命令來模擬用戶程序中調(diào)用的文件操作。
代碼片段和文件信息
#include?
#include
#include
#include?
#include?
#include?
#include“stdlib.h“
#define?NULL?0
#define?get(type)?(type?*)malloc(sizeof(type))//分配空間
typedef?struct?list?LIST;
struct?list
{
char?listname[10];///文件名長度
int?type;
int?length;/////文件長度
int?protect;/////保護(hù)模式,0為只讀1為可讀寫
int?flag;//////標(biāo)志為0時(shí)創(chuàng)建文件夾,為1時(shí)創(chuàng)建文件
char?*content;
struct?list?*parent;
struct?list?*child;
struct?list?*next;
};
typedef?struct?usd?USD;
struct?usd
{
????char?username[10];////用戶名長度
????LIST?*list;
????struct?usd?*next;
};
////函數(shù)聲明/////
void?displayusermenu();///用戶管理界面菜單
void?time();///系統(tǒng)時(shí)間
void?displayfilemenu();///文件管理界面菜單
void?creatuser();///新建用戶
void?deleteuser();///刪除用戶
void?displayuser();///顯示用戶
void?userhelp()
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????53248??2009-11-29?19:31??文件目錄管理\Debug\vc60.pdb
?????文件?????225355??2009-11-29?19:32??文件目錄管理\Debug\文件目錄管理.exe
?????文件??????66019??2009-11-29?19:31??文件目錄管理\Debug\文件目錄管理.obj
?????文件?????590848??2009-11-29?19:32??文件目錄管理\Debug\文件目錄管理.pdb
?????文件?????225355??2009-11-29?17:31??文件目錄管理\Debug\文件管理系統(tǒng).exe
?????文件??????66932??2009-11-29?17:33??文件目錄管理\Debug\文件管理系統(tǒng).obj
?????文件?????599040??2009-11-29?17:31??文件目錄管理\Debug\文件管理系統(tǒng).pdb
?????文件????????411??2007-06-28?04:48??文件目錄管理\resource.h
?????文件???????1447??2007-06-28?04:48??文件目錄管理\sc
?????文件??????18587??2009-11-29?19:31??文件目錄管理\文件目錄管理.cpp
?????文件???????3475??2009-11-29?17:35??文件目錄管理\文件目錄管理.dsp
?????文件????????532??2009-11-29?21:27??文件目錄管理\文件目錄管理.dsw
?????文件??????33792??2009-11-29?21:27??文件目錄管理\文件目錄管理.ncb
?????文件??????48640??2009-11-29?21:27??文件目錄管理\文件目錄管理.opt
?????文件????????776??2009-11-29?19:32??文件目錄管理\文件目錄管理.plg
?????目錄??????????0??2012-05-15?15:05??文件目錄管理\Debug
?????目錄??????????0??2012-05-15?15:05??文件目錄管理
-----------?---------??----------?-----??----
??????????????1934457????????????????????17
評論
共有 條評論