boolean success = (new File("directoryName")).delete();
if (success) {
// Deletion successful
}
Subscribe to:
Post Comments (Atom)
Sample Java Codes Copyright © 2008 Green Scrapbook Diary Designed by SimplyWP | Made free by Scrapbooking Software | Bloggerized by Ipiet Notez
1 comments:
The directory needs to be empty, or it won't be deleted. Can we use File.list() to recursively delete all the contents first?
Post a Comment