diff --git a/samples/System.IO.FileSystem/BasicFileSystemExample/Program.cs b/samples/System.IO.FileSystem/BasicFileSystemExample/Program.cs index f451de9b..3b29b0ca 100644 --- a/samples/System.IO.FileSystem/BasicFileSystemExample/Program.cs +++ b/samples/System.IO.FileSystem/BasicFileSystemExample/Program.cs @@ -38,11 +38,10 @@ public static void Main() Debug.WriteLine("+++++ System.IO.FileSystem examples +++++"); Debug.WriteLine("+++++ Creating a sample file +++++"); - File.Create(sampleFilePath); + var fs=File.Create(sampleFilePath); byte[] sampleBuffer = Encoding.UTF8.GetBytes(sampleText); - FileStream fs = new FileStream(sampleFilePath, FileMode.Open, FileAccess.ReadWrite); fs.Write(sampleBuffer, 0, sampleBuffer.Length); if(fs.CanSeek) diff --git a/samples/System.IO.FileSystem/MountExample/Program.cs b/samples/System.IO.FileSystem/MountExample/Program.cs index d9126daa..6f76a129 100644 --- a/samples/System.IO.FileSystem/MountExample/Program.cs +++ b/samples/System.IO.FileSystem/MountExample/Program.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.Threading; using nanoFramework.System.IO.FileSystem; +using nanoFramework.System.IO; namespace MountExample { @@ -84,14 +85,14 @@ static bool MountMyCard() // This only works for SD card adapter that include card detect pin tied to GPIO pin // If no Card Detect pin then events not required - private static void StorageEventManager_RemovableDeviceRemoved(object sender, RemovableDeviceEventArgs e) + private static void StorageEventManager_RemovableDeviceRemoved(object sender, RemovableDriveEventArgs e) { - Debug.WriteLine($"Card removed - Event:{e.Event} Path:{e.Path}"); + Debug.WriteLine($"Card removed - Event:{e.Event} Path:{e.Drive}"); } - private static void StorageEventManager_RemovableDeviceInserted(object sender, RemovableDeviceEventArgs e) + private static void StorageEventManager_RemovableDeviceInserted(object sender, RemovableDriveEventArgs e) { - Debug.WriteLine($"Card inserted - Event:{e.Event} Path:{e.Path}"); + Debug.WriteLine($"Card inserted - Event:{e.Event} Path:{e.Drive}"); // Card just inserted lets try to mount it MountMyCard();