?? disk.h
字號:
// Disk.h: interface for the CDisk class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DISK_H__DFCA2BAF_C95D_46F7_ADBE_1D2E6BCE7AA0__INCLUDED_)
#define AFX_DISK_H__DFCA2BAF_C95D_46F7_ADBE_1D2E6BCE7AA0__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TypeDlg.h"
#include "EditDlg.h"
typedef struct List{ //目錄 共8個字節
char name[3]; //名字 3個字節
char postfix; //后綴 1個字節
byte type; //類型,1:根目錄,2:目錄、3:文件 1個字節
byte start; //文件開始邏輯地址,起始盤號 1字節
short int ilength; //存放文件長度 2個字節
}List;
class CDisk
{
public:
CDisk();
virtual ~CDisk();
private:
bool Seekroom(char name,int L_address[3],int big=2);
//尋找空間,在指定的盤 name 找指定的空間 big,L_address[3]為返回空閑地址
int LtoP(byte L_address); //邏輯地址轉換成物理地址
public:
bool Fdisk(int num,char name[8],int big[8]); //初始化模擬硬盤
bool Create(char name[3],CString * strError,char potfix='e'); //創建文件.strError為傳送錯誤信息
bool Makdir(char name[3],CString * strError); //創建文件夾.strError為傳送錯誤信息
bool CD(char name[3],CString * strError); //進入下一層目錄
bool Delete(char name[6],CString * strError); //刪除文件
bool Rdir(char name[3],CString * strError); //刪除空目錄
bool Deldir(byte index,CString *strError); //刪除非空或空目錄的遞歸函數
bool Deldir(char name[3],CString * strError); //刪除非空或空目錄
bool Type(char name[6],CString str,CString * strError); //顯示文件
bool Edit(char name[6],CString * strError); //編輯文件
bool Find(char name[6],CString *str,CString * strError);//查找文件
public:
CFile file; //文件指針
CByteArray load; //當前路徑,第一個存盤號的索引(0-8)
byte byinfo[128]; //分配表信息
byte byRootnum; //根目錄數,盤數
List Rootlist[8]; //根目錄
List list; //目錄
CTypeDlg tydlg; //顯示文件對話框
CEditDlg eddlg; //編輯文件對話框
};
#endif // !defined(AFX_DISK_H__DFCA2BAF_C95D_46F7_ADBE_1D2E6BCE7AA0__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -