From 95f85e8c36842cc5c1e0e5a1c5be8a63fe7eccab Mon Sep 17 00:00:00 2001 From: randomusert <127417963+randomusert@users.noreply.github.com> Date: Fri, 26 Apr 2024 15:08:11 +0300 Subject: [PATCH 1/2] fix link --- articles/Kernel/VFS.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/Kernel/VFS.html b/articles/Kernel/VFS.html index 9cae7eb6c..8334587b2 100644 --- a/articles/Kernel/VFS.html +++ b/articles/Kernel/VFS.html @@ -205,7 +205,7 @@
Note: From now on, we'll be using some plugged functions from System.IO
, so be sure to use that reference to your code. Now, let's get started over some useful functions:
Note: You don't have to format your drive if you're debugging your Cosmos project with VMWare. The build will automatically add an already formatted FAT32 VMDK file for your convenience.
-You can get all available disks using VFSManager.GetDisks()
. The methods to get information about the disk or format it can be found under the Disk class.
+
You can get all available disks using VFSManager.GetDisks()
. The methods to get information about the disk or format it can be found under the Disk class.
To format a disk use the FormatDisk(int index, string format, bool quick = true)
method.
First, we should create and initialize an instance of the VFS, this will initialize the partition and files-system lists, as well as register the new VFS. This is essential for using the VFS.
We start with creating a global CosmosVFS, this line should appear outside of any function, and before the BeforeRun() function.
-Sys.FileSystem.CosmosVFS fs = new Cosmos.FileSystem.CosmosVFS();
+Sys.FileSystem.CosmosVFS fs = new Cosmos.System.FileSystem.CosmosVFS();
Next, we register our VFS at the VFS manager, this will initiate the VFS and make it usable, add this to your kernel's BeforeRun() function:
Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);