Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix link #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions articles/Kernel/VFS.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ <h1 id="file-system">File System</h1>
<p>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.</p>
<p>We start with creating a global CosmosVFS, this line should appear outside of any function, and before the BeforeRun() function.</p>
<pre><code class="lang-C#">Sys.FileSystem.CosmosVFS fs = new Cosmos.FileSystem.CosmosVFS();
<pre><code class="lang-C#">Sys.FileSystem.CosmosVFS fs = new Cosmos.System.FileSystem.CosmosVFS();
</code></pre>
<p>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:</p>
<pre><code class="lang-C#">Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);
</code></pre>
<p><strong>Note</strong>: From now on, we'll be using some plugged functions from <code>System.IO</code>, so be sure to use that reference to your code. Now, let's get started over some useful functions:</p>
<h2 id="format-disks">Format disks</h2>
<p><strong>Note</strong>: 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.</p>
<p>You can get all available disks using <code>VFSManager.GetDisks()</code>. The methods to get information about the disk or format it can be found under the <a href="https://cosmosos.github.io/api/Cosmos.System.FileSystem.Disk.html">Disk</a> class.
<p>You can get all available disks using <code>VFSManager.GetDisks()</code>. The methods to get information about the disk or format it can be found under the <a href="https://cosmosos.github.io/api/cosmos/Cosmos.System.FileSystem.Disk.html">Disk</a> class.
To format a disk use the <a href="https://cosmosos.github.io/api/Cosmos.System.FileSystem.Disk.html#Cosmos_System_FileSystem_Disk_FormatPartition_System_Int32_System_String_System_Boolean_"><code>FormatDisk(int index, string format, bool quick = true)</code></a>
method.</p>
<h2 id="get-available-free-space">Get available free space</h2>
Expand Down