Exemplo n.º 1
0
 public static boolean deleteXmlDocument(String fileName) {
   File file = new File(fileName);
   if (!file.exists()) {
     return true;
   }
   if (!file.canWrite()) {
     return false;
   }
   return file.delete();
 }
Exemplo n.º 2
0
 // When already existing adapted project is created , need to move to new adapted project
 private boolean deleteCIJobFile(ApplicationInfo appInfo) throws PhrescoException {
   S_LOGGER.debug("Entering Method ProjectAdministratorImpl.deleteCI()");
   try {
     File ciJobInfo = new File(getCIJobPath(appInfo));
     return ciJobInfo.delete();
   } catch (ClientHandlerException ex) {
     S_LOGGER.error(
         "Entered into catch block of ProjectAdministratorImpl.deleteCI()"
             + ex.getLocalizedMessage());
     throw new PhrescoException(ex);
   }
 }