Created
September 24, 2013 06:17
-
-
Save jarontai/6680986 to your computer and use it in GitHub Desktop.
android delete folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void DeleteRecursive(File fileOrDirectory) { | |
| if (fileOrDirectory.isDirectory()) | |
| for (File child : fileOrDirectory.listFiles()) | |
| DeleteRecursive(child); | |
| fileOrDirectory.delete(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment