Hello all
I am trying to open a file on a SD card connected to a Cerb40 device (OSHW library) but I cannot find references to FileStream nor Directory classes (I expected them to be in System.IO).
The mounting of the SD card is ok and the volume seems to report correct values. Am I missing an assembly reference?
My references are:
- GHI.Hardware.FEZCerb
- GHI.OSHW.Hardware
- Microsoft.SPOT.IO
- Microsoft.SPOT.Native
- mscorlib
My code
using System;
using Microsoft.SPOT;
using GHI.OSHW.Hardware;
using System.IO;
using Microsoft.SPOT.IO;
namespace MFConsoleApplication2
{
public class Program
{
public static void Main()
{
Debug.Print(
Resources.GetString(Resources.StringResources.String1));
StorageDev.MountSD();
var volume = VolumeInfo.GetVolumes()[0];
var root = volume.RootDirectory;
var space = volume.TotalFreeSpace;
Debug.Print(space.ToString());
using (var file = new FileStream("\\SD\\test.txt", FileMode.Open)) // Where is FileStream ? System.IO ???
{
}
Debug.Print(root);
StorageDev.UnmountSD();
}
}
}
Thanks
Luc