|
using System;
using System.Collections;
using System.IO;
using System.Text;
namespace JFileManager
{
// Try and speed things up by using the same Drive Array for all controls
class cDriveData
{
private static DriveInfo[] m_allDrives = null;
private static void GetDriveData(bool blnRefresh)
{
if (blnRefresh || m_allDrives == null)
{
m_allDrives = DriveInfo.GetDrives();
}
}
public static DriveInfo[] DriveArray
{
get
{
if (m_allDrives == null)
GetDriveData(true);
return m_allDrives;
}
}
public static void RefreshDriveData()
{
GetDriveData(true);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have been a keen hobbyist programmer since getting my first computer - a Vic 20 (you had to be able to write programs then since few programs were available and all were expensive).
Retired and now living in Pewsey, Wiltshire, where I spend (far too much of) my time writing computer programs to keep my mind active.