您的位置:首页 > Web前端

Find the Root Folder Name of the SD Card.

2012-08-01 16:30 330 查看
Find the Root Folder Name of the SD Card.

void getSdCardPath()

{
DirectoryInfo rootDir = new DirectoryInfo(@"\");

FileAttributes attrStorageCard = FileAttributes.Directory |
FileAttributes.Temporary;

ArrayList myAttr = new ArrayList();

foreach( FileSystemInfo fsi in rootDir.GetFileSystemInfos() )
{
if ( (fsi.Attributes & attrStorageCard) == attrStorageCard )
{
//Found storage card
myAttr.Add(fsi.FullName.ToString());
}
}
}


reference:

http://www.pcreview.co.uk/forums/detect-storage-card-root-folder-name-t1308987.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  reference
相关文章推荐