I am trying to make an OS using Cosmos, I have gotten to the point where I want to add a filesystem. The VFS filesystem doesn't work, if I create a new virtual machine or try using it on a physical machine. It only works on the virtual machine that Cosmos makes for me. Does anyone know how to create a filesystem using Cosmos that is not a virtual file system?. I am using VMware to test my OS.
This is my first time I have asked a question on Stack, so sorry if it is unclear.
When I run the OS in the virtual machine Cosmos automatically makes the file system wors, when I make another virtual machine using the iso file then and try and create a file I get a FileNotFoundException
. This is my code to make the file:
var current_dict = Directory.GetCurrentDirectory();
Console.Write("Enter you filename: ");
var name = Console.ReadLine();
try
{
//fs.CreateFile(@"0:\"+name);
File.Create(@"0:\" + name);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
and this is the bit that makes the VFS:
Sys.FileSystem.CosmosVFS fs = new Sys.FileSystem.CosmosVFS();
//Sys.FileSystem.Disk fs = new Sys.FileSystem.CosmosVFS();
protected override void BeforeRun()
{
Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);