I created a new dir in my app directory with
var parent = Titanium.Filesystem.getApplicationDataDirectory(); var new_folder = Titanium.Filesystem.getFile(parent, 'atlas'); new_folder.createDirectory();
Now i would to delete this directory and all it's content, I tryied whit
but it seems don't work..!
Any help! Thank you!
According to the doc, by default deleteDirectory is not recursive. So if you have subfolders (or if the directory is not empty ?), I suppose you need to use the optional boolean parameter :
Just a small amendment to your code, and I think it will work. According to the Titanium.Filesystem.File docs, it's deleteDirectory() rather than removeDirectory().
Sorry, it's true bu directory it's still here!
I have the same problem but i want to delete only the subdirectory when i use true with deleteDirectory i have /pdf/low all deleted any help thanks.
~~~ var parent =Titanium.Filesystem.applicationDataDirectory+'pdf'; var PdfDir = Titanium.Filesystem.getFile(parent,'low'); pdfDir.deleteDirectory(true); ~~~