Check out example codes for "c# get free space on drive". It will help you in understanding the concepts better.

Code Example 1

using System.IO;

private long GetTotalFreeSpace(string driveName)
{
    foreach (DriveInfo drive in DriveInfo.GetDrives())
    {
        if (drive.IsReady && drive.Name == driveName)
        {
            return drive.TotalFreeSpace;
        }
    }
    return -1;
}

Learn ReactJs, React Native from akashmittal.com