AliSherKashif / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

com.codename1.io.FileSystemStorage has no rmdir() method #1375

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
com.codename1.io.FileSystemStorage has a mkdir() method but no rmdir() method.

I need a rmdir() method because I want to use temporary directories.

Original issue reported on code.google.com by Stefan.A...@gmail.com on 26 Feb 2015 at 5:08

GoogleCodeExporter commented 9 years ago

Original comment by shai.almog on 26 Feb 2015 at 5:08

GoogleCodeExporter commented 9 years ago
I need to be able to create a directory for creating mail attachments with 
given file names. I really would like to remove the directories if they are 
above a specified age.
Is there a planned release date with which I can expect?

Original comment by Stefan.A...@gmail.com on 3 Mar 2015 at 3:34

GoogleCodeExporter commented 9 years ago
I'll be looking at this today and should be able to commit to SVN.  From there 
it would be included in the next release... Shai can comment further on when 
that would be.

Original comment by steve.ha...@codenameone.com on 3 Mar 2015 at 3:38

GoogleCodeExporter commented 9 years ago
I have implemented this now.
https://code.google.com/p/codenameone/source/detail?r=2175

For this initial implementation I chose to implement it using the current 
FileSystem operations rather than a native implementation on each platform.  We 
can revisit this later if there are issues on any given platform.   So far 
tested on Simulator, iOS, and Android.  Don't have a WinPhone, J2ME, or RIM dev 
environment set up yet, but should work on those too.

Original comment by steve.ha...@codenameone.com on 3 Mar 2015 at 6:35

GoogleCodeExporter commented 9 years ago
After some discussion, we decided to remove the rmdir() implementation, and 
instead just update the JavaDocs to reflect the fact that deleteFile() also 
deletes empty directories. 

Original comment by steve.ha...@codenameone.com on 3 Mar 2015 at 8:15