public boolean delete(File file) { removeLocalInputFile(file); String owner = this.buildNewOwnerId("delete"); AbstractProxy proxy = this.getAvailableProxy(owner); boolean res = false; try { FileCacheableInformations infos = this.getInformations(file); if (infos.isExists()) { if (infos.isDirectory()) { res = proxy.deleteDir(this.translateToRemote(file)); } else { res = proxy.deleteFile(this.translateToRemote(file)); } } else { res = true; } } catch (RemoteConnectionException e) { Logger.defaultLogger() .error("Error caught while deleting " + FileSystemManager.getDisplayPath(file), e); throw new UnexpectedConnectionException(e); } finally { this.releaseProxy(proxy, owner); } return res; }