[MonoTouch] writing a file

Geoff Norton gnorton at novell.com
Mon Aug 24 18:23:57 EDT 2009


Clayton,

   This is fixed in SVN and will be in the next beta.

Thanks

-g

On 24-Aug-09, at 12:43 AM, Clayton Harbour wrote:

> Is it possible to save a file to the iTouch/ iPhone?  I am able to  
> do this in the simulator but I keep getting a crash on the device.   
> I am not doing anything fancy but here is the code for reference:
> FileInfo file = new FileInfo(Path.GetTempFileName());
> using (StreamWriter s = new StreamWriter(file.FullName)) {
>     s.Write(contents);
>     s.Close();
> }
>
> I have also tried to use the App data folder but even getting the  
> path to that folder seems to crash the application.  I can include  
> the stack trace if it's useful, right now I just want to know if  
> it's possible and if I am doing anything silly =).
>
> Thanks,
>
> Clayton
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch



More information about the MonoTouch mailing list