[mono-android] Deleting files on external storage?
Carlo Bolz
cb at dm-edv.de
Tue Mar 29 10:22:29 EDT 2011
I am experienced the same behaviour but can´t resolve it.
Regards,
Carlo
Von: monodroid-bounces at lists.ximian.com
[mailto:monodroid-bounces at lists.ximian.com] Im Auftrag von Jon Valvatne
Gesendet: Dienstag, 29. März 2011 11:07
An: Jb Evain
Cc: monodroid at lists.ximian.com
Betreff: Re: [mono-android] Deleting files on external storage?
Oops - looks like I created a too-simple test case. This also fails in the
same way, though:
System.IO.FileStream fs =
System.IO.File.Create("/sdcard/test.txt");
fs.Close();
System.IO.File.Delete("/sdcard/test.txt");
On Tue, Mar 29, 2011 at 11:00 AM, Jb Evain <jbevain at gmail.com> wrote:
Hi,
On Tue, Mar 29, 2011 at 10:51 AM, Jon Valvatne <jon at norsync.com> wrote:
> System.IO.File.Create("/sdcard/test.txt");
> System.IO.File.Delete("/sdcard/test.txt");
>
> Has anyone successfully deleted a file off external storage from C# code?
Have you properly disposed the created file stream (using either the
Close or Dispose method, or the using pattern on it) before trying to
delete the actual file?
Jb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110329/2ce73373/attachment.html
More information about the Monodroid
mailing list