Trouble writing to FatImage

Dec 17, 2014 at 3:08 AM

I am new to .NET and usually write in Java, so this may be a obvious question.

I am able to create a FatFileSystem and make directories within it, but I cannot write files to it.

Every time I do, it says that 'Invalid Path'... Here's the code
using (FileStream data = File.Create(dirPath))
                using (system = FatFileSystem.FormatFloppy(data, FloppyDiskType.HighDensity, "SDCARD"))
                    using (Stream output = system.OpenFile(@"scope_record.csv", FileMode.Create))
                        using (
                            Stream input = new FileStream(@"C:\Users\Joseph\Documents\scope_record.csv", FileMode.Open))
                            var bytes = new byte[input.Length];
                            input.Read(bytes, 0, bytes.Length);
                            output.Write(bytes, 0, bytes.Length);
The exception is thrown when initializing Stream output.

I am confused on how the path is invalid, as I tried to follow the simple example on the Home page for DiscUtils.

Dec 19, 2014 at 11:03 PM
Figured it out... it was the underscore ('_') in the file name...