private void 格式化ToolStripMenuItem_Click(object sender, EventArgs e) { root_fcb = new FCB(0); directory = new Directory(); folderStack = new Stack <FCB>(); Overall_bitMap = new My_BitMap(); current_directory = root_fcb; UpdateView(); Console.WriteLine("执行格式化函数!"); FileStream fs = new FileStream("txtRecord\\Block.txt", FileMode.Truncate, FileAccess.Write); //fs.Seek(0, SeekOrigin.Begin); //fs.SetLength(0); fs.Close(); FileStream fs02 = new FileStream("txtRecord\\BitMap.txt", FileMode.Truncate, FileAccess.Write); //fs02.SetLength(0); //fs02.Seek(0, SeekOrigin.Begin); fs02.Close(); FileStream fs03 = new FileStream("txtRecord\\File.txt", FileMode.Truncate, FileAccess.Write); //fs03.SetLength(0); fs03.Close(); FileStream fs04 = new FileStream("txtRecord\\FCB.txt", FileMode.Truncate, FileAccess.Write); //fs04.SetLength(0); fs04.Close(); Format = true; }