Sep 23

Use the File classes delete() method. Remember to check the return value which indicates whether the deletion was successful.

// file to be deleted

File file = new File(filename);

// Delete the file

if (!from.delete())
   // Deletion failed

written by objects \\ tags:

Leave a Reply

You must be logged in to post a comment.