C#Cosmos文件系统错误“未找到分区!”

问题描述

我正在尝试在cosmos OS中添加文件系统。启动操作系统时,出现以下错误

这是我所有的源代码

using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;
using Cosmos.System.Graphics;
using System.Drawing;
using System.Xml.Linq;

namespace OperatingSystem
{
    public class Kernel : Sys.Kernel
    {
        Sys.FileSystem.CosmosVFS fs;
        // string current_directory = "0:\\";

        public void Save(string save)
        {
            string fullPath = @"0:\write.txt\";
            Console.WriteLine(save); 
            using (StreamWriter writer = new StreamWriter(fullPath))
            {
                writer.WriteLine(save);
            }  
            string readText = File.ReadAllText(fullPath);
            Console.WriteLine(readText);
        }

        public void check(string text)
        {
            Console.Write("Is that all you want to write [Y/N] ");
            switch(Console.ReadLine())
            {
                case "Y":
                    Save(text);
                    break;

                case "y":
                    Save(text);
                    break;

                case "N":
                    Run();
                    break;

                case "n":
                    Run();
                    break;
            }
        }

        protected override void BeforeRun()
        {
            Console.WriteLine("Welcome to Print OS!");
            fs = new Sys.FileSystem.CosmosVFS();
            Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);
        }

        protected override void Run()
        {
            Console.BackgroundColor = ConsoleColor.Blue;
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("Print OS Version 1.0");
            Console.BackgroundColor = ConsoleColor.Black;

            Console.Write("#> ");
            var input = Console.ReadLine();
            check(input);
        }
    }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...