Using: Libs version 1.0.0-preview2 and 1.0.0-preview3 - Neither worked for Move
I have been trying to use Directory.Move(sourceDirectory, destinationDirectory);
I never receive exceptions in Try Catch.
Maybe I am the problem but I thought I would let you know anyway.
//StorageController sc
if (sc == null)
{
sc = StorageController.FromName(@"GHIElectronics.TinyCLR.NativeApis.STM32F7.SdCardStorageController\0");
drive = FileSystem.Mount(sc.Hdc);
}
//
//These directories already exist on the SD Card. Each has a small text file in the folder
//drive.CreateDirectory($@"{drive.Name}FolderToMove");
//FolderToMove.txt
//drive.CreateDirectory($@"{drive.Name}FolderToMoveTo");
//FolderToMoveTo.txt
DirectoryInfo di0 = new DirectoryInfo($@"{drive.Name}FolderToMove");
DirectoryInfo di1 = new DirectoryInfo($@"{drive.Name}FolderToMoveTo");
if (di0.Exists && di1.Exists)
{
string sourceDirectory = $@"{drive.Name}FolderToMove";
string destinationDirectory = $@"{drive.Name}FolderToMoveTo";
try
{
// Tried both ways - No exceptions received using either one
//Directory.Move(sourceDirectory, destinationDirectory);
Directory.Move(di0.Name, di1.Name);
}
catch
{
// No exceptions received
screen.DrawString("Directory.Move ERROR", droidreg12, BrushRed, 450, 210);
screen.Flush();
}
//
}
//
else
{
screen.DrawString(di0.Name + " & " + di1.Name + " do not exist.", droidreg12, BrushRed, 405, 182);
screen.Flush();
}
//