Not sure if it's your issue, but use Path.Combine instead of manually creating paths. Android is Linux based, so it uses forward slashes instead of backwards slashes.

Jonathan

On 3/21/2012 7:19 PM, Paul Johnson wrote:
Hi,

I have some very simple code for writing to the SDCard (pruned from
postings on here and other places). Only problem is that it throws an
exception when writing the directory.

On closer examination, external contains nothing. Is this what it should
contain and if it isn't, does anyone have an example of how to set up a
directory on the SDCard I could have a look-see at?

var external = GetExternalFilesDir(null);
if (!File.Exists(external + "\\myDir"))
{
System.IO.Directory.CreateDirectory(external + "\\myDir");
}

Thanks

Paul
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid



_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to