[mono-android] Question regarding FileCreationMode.WorldReadable
craig
craigrs84 at gmail.com
Tue Feb 14 00:11:57 UTC 2012
I found the answer shortly after I posted.
Apparently when using Context.OpenFileOutput you only supply the filename
and not a path. I was supplying the full path, in my case
/data/data/MCC.Android/files/Test.txt vs. just Test.txt. The file is still
written to the same exact directory, you just can't supply a path or it
throws an error.
So that is fixed and I can move forward now, but I'm still wondering if
there is a way to easily add the WorldReadable flag to an already existing
file that was not created using Context.OpenFileOutput... in my case the
file was created by using the WebClient.DownloadFile method.
I suppose I could refactor my code to download the file to memory first and
then write it to file using OpenFileOutput but I'd rather avoid this if
possible. Also I was hoping to make my code that does the file I/O
cross-platform for either Android or iOS, and using Context.OpenFileOutput
means my shared class now has Android specific code in it.
Any help is appreciated, thanks.
--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/Question-regarding-FileCreationMode-WorldReadable-tp5480914p5480990.html
Sent from the Mono for Android mailing list archive at Nabble.com.
More information about the Monodroid
mailing list