I am not on the machine to get the syntax for you, but I believe that you can use the System.IO namespace to get IO-based attributes.
First, enter DirectoryInfo on the memory card. (I'm not 100% here, you may have to test, I will update it if I can get to my car)
public DirectoryInfo GetStorageCard() { DirectoryInfo deviceRoot = new DirectoryInfo("/"); foreach (DirectoryInfo dir in deviceRoot.GetDirectories()) if (dir.Attributes == FileAttributes.Directory & dir.Attributes = FileAttributes.Temporary) return dir; }
Then check all the properties in DirectoryInfo that the code returns. Thanks to the joys of debugging, you need to make sure that the serial number is one of the available properties.
If not, you may need to reinstall a bit.
Hope this helps.
source share