I need to write an image (e.g. .iso, .img) to an SD card. The use shouldn't matter, but it happens to be writing a bootable image to an sdcard for a rasperry pi.
On Linux/Mono, I would do something along the following:
using (var stream = File.OpenWrite("H:\\"))
{
//Copy the .img file to stream
}
However, I'm doing this on a Windows machine. This throws:
UnauthorizedAccessException: "Access to the path 'H:\' is denied."