Esempio n. 1
0
 /**
  * Deletes the file or directory denoted by this abstract pathname. If this pathname denotes a
  * directory, then the directory must be empty in order to be deleted.
  */
 public boolean delete() {
   try {
     if (isDirectory()) {
       ftpClient.deleteDir(getPath());
     } else {
       ftpClient.deleteFile(getPath());
     }
   } catch (IOException e) {
     return false;
   } catch (FTPException e) {
     return false;
   }
   return true;
 }