Author |
Topic |
|
davidknechtges
6 Posts |
Posted - 28 Apr 2008 : 16:15:03
|
I am trying to write to the FlashFX disk from C# (using a stream writer to perform XML serialization on a class). I get an IOException when doing this no matter what I do.
If I direct the write to the \Temp folder or the other folders, the same code I have written works correctly.
I have also tried using the ADSCF Flash class and calling Open before the writes, but that had no effect either.
Is there something else I should know?
Thanks,
David |
|
ctacke
877 Posts |
Posted - 28 Apr 2008 : 16:25:48
|
Showing your failing code would be very useful. My bet is that you're not enclosing the path in quotes, so the space in the name is causing a failure. |
|
|
davidknechtges
6 Posts |
Posted - 29 Apr 2008 : 08:52:51
|
Below is a snippet. If I run it as shown, it will throw the IOException. If I run it with the GetFileNameWithQuotes, it throws the Value does not fall within expected range exception.
If I change GetFileName to any other folder, it works.
StreamWriter st = new StreamWriter(GetFileName());
string file = "test.txt";
public string GetFileName() { return String.Format(@"\FlashFX Disk\{0}", file); // IOException // return String.Format(@"\My Documents\{0}", file); - this line works correctly and opens the file for writing. } public string GetFileNameWithQuotes() { return String.Format(@"""\FlashFX Disk\{0}""", file); // Value does not fall within expected range Exception. } |
|
|
davidknechtges
6 Posts |
Posted - 29 Apr 2008 : 09:22:07
|
Nevermind, I believe this is a hardware problem, not a code problem.
Thanks.... |
|
|
cbadr
154 Posts |
Posted - 29 Apr 2008 : 16:02:02
|
Where are you running your application from? |
|
|
|
Topic |
|
|
|