diff --git a/articles/Kernel/VFS.html b/articles/Kernel/VFS.html index 9cae7eb6c..50849db94 100644 --- a/articles/Kernel/VFS.html +++ b/articles/Kernel/VFS.html @@ -197,7 +197,7 @@

File System

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);
@@ -205,7 +205,7 @@ 

File System

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:

Format disks

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.

Get available free space