Closed ezio416 closed 5 months ago
The following code works for me:
auto path = IO::FromStorageFolder("Test");
auto newPath = IO::FromStorageFolder("Test_Moved");
IO::CreateFolder(path);
{
IO::File f(path + "/test.txt", IO::FileMode::Write);
f.WriteLine("Hello world");
}
IO::Move(path, newPath);
I did however change IO::Move
to use MOVEFILE_WRITE_THROUGH
, but that shouldn't matter too much if you're not immediately observing the directory.
This snippet does work, my bad. I made the issue based on the discord convo but hadn't actually tested it myself.
Maybe this could instead be
IO::Rename
that could work for files and folders, but I think MoveFolder would be more consistent with existing functions