freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

操作系統(tǒng)課程設(shè)計(jì)報(bào)告:linux二級文件系統(tǒng)設(shè)計(jì)(編輯修改稿)

2025-04-19 08:34 本頁面
 

【文章內(nèi)容簡介】 NY請轉(zhuǎn)到當(dāng)前用戶名目錄下當(dāng)前文件存在?(文件號0)輸入要?jiǎng)h除的文件名,并查找對應(yīng)的文件號Y該文件不存在N確定當(dāng)前用戶的用戶號該文件可以被刪除?(不是protect型的)該文件是protect的,不能打開NY該文件已經(jīng)打開?該文件已經(jīng)打開,不能刪除YN刪除文件確定文件路徑刪除的后面的文件向前移該用戶的文件總數(shù)1返回主函數(shù)把刪除后的地址號置為未用【源程序清單】Open,close,write、delete函數(shù)代碼如下:void OpenF() /*打開文件*/{ char fname[MAXNAME]。 int i,k。 if (strcmp(strupr(dirname),strupr(username))!=0) /*用戶名和當(dāng)前目錄不同*/ { printf(\nError! You can only open file in yourself dir.\n)。 } else /*用戶名和當(dāng)前目錄相同了*/ { printf(\nPlease input FileName:)。 gets(fname)。 ltrim(rtrim(fname))。 /*去除空格*/ i=ExistF(fname)。 /*文件是否存在并返回第幾個(gè)文件號*/ if (i=0) /*文件存在*/ { k=ExistD(username)。 /*根據(jù)用戶名確定用戶號*/ if(ifopen[k][i].ifopen==1) /*該文件已經(jīng)打開*/ { printf(\nError. file \39。%s\39。 had been opened, it can not be opened again.\n,fname)。 } else /*該文件還未打開*/ { if((ufd[k]ufdfile[i].fmode==0)||(ufd[k]ufdfile[i].fmode==1)||(ufd[k]ufdfile[i].fmode==2)) /*該文件的屬性是可以被打開的*/ { ifopen[k][i].ifopen=1。 /*打開,將ifopen設(shè)為1*/ ifopen[k][i].openmode=(ufd[k]ufdfile[i].fmode)。 /**/ printf(\39。%s\39。 has been opened successfully!,fname)。 } else /*保護(hù)模式的文件不能被打開*/ printf(\n\39。%s\39。 is a protected file, it can not be opened.,fname)。 } } else /*文件不存在*/ { printf(\nError.\39。%s\39。 dose not exist.\n,fname)。 } }}void CloseF() /*關(guān)閉文件*/{ char fname[MAXNAME]。 int i,k。 if (strcmp(strupr(dirname),strupr(username))!=0) /*用戶名和當(dāng)前目錄不同*/ { printf(\ can only modify filemode in yourself dir.\n)。 } else /*用戶名和當(dāng)前目錄相同了*/ { printf(\nPlease input FileName:)。 gets(fname)。 ltrim(rtrim(fname))。 /*去除空格*/ i=ExistF(fname)。 /*文件是否存在并返回第幾個(gè)文件號*/ if (i=0) /*文件存在*/ { k=ExistD(username)。 /*根據(jù)用戶名確定用戶號*/ if(ifopen[k][i].ifopen==0) /*該文件未打開*/ { printf(\nError. \39。%s\39。 has been closed. you can not close it again.\n,fname)。 } else /*該文件已打開*/ { ifopen[k][i].ifopen=0。 /*關(guān)閉,置為0*/ ifopen[k][i].openmode=4。 /*修改打開模式為初始的打開模式*/ printf(\39。%s\39。 has been closed successfully!,fname)。 } }
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1