|
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace BeeMobile
{
public class StorageCardInfo
{
/// <summary>
/// Returns the list of Storage Card names. A localized (e.g. Chinese) device can have different name than "Storage Card".
/// </summary>
/// <returns>The list of Storage Card names.</returns>
static public List<string> GetStorageCardNames()
{
DirectoryInfo rootInfo = new DirectoryInfo("\\");
List<string> paths = new List<string>();
foreach (DirectoryInfo dirInfo in rootInfo.GetDirectories())
{
if ((dirInfo.Attributes & FileAttributes.Temporary) != 0)
{
//Debug.WriteLine("Directory Name: " + dirInfo.Name)
//Debug.WriteLine(" Full Name: " + dirInfo.FullName)
paths.Add(dirInfo.FullName);
}
}
return paths;
}
}
}
|
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 work for Bee Mobile.
Web site: http://beemobile4.net
Facebook site: http://facebook.com/BeeMobile
YouTube Channel: http://youtube.com/beemobile4dotnet