public void deleteRemoteFile(String filename) throws ClientException { try { if(!this.ftpClient.deleteFile(filename)) { throw new ClientException("Exception while deleting file [" + filename + "]"); //$NON-NLS-1$//$NON-NLS-2$ } } catch (IOException e) { throw new ClientException("Exception while deleting file [" + filename + "]", e); //$NON-NLS-1$//$NON-NLS-2$ } }
public void deleteRemoteFile(String filename) throws ClientException { try { if(!this.ftpClient.deleteFile(filename)) { throw new ClientException("Exception while deleting file [" + filename + "]"); //$NON-NLS-1$//$NON-NLS-2$ } } catch (IOException e) { throw new ClientException("Exception while deleting file [" + filename + "]", e); //$NON-NLS-1$//$NON-NLS-2$ } }
/** * Attempts to delete a given file from the remote host. Used by get() * (getDestructive) as well as by outside clients * * @param filename The absolute path to a file/directory on the remote host. * @throws ClientException */ public void deleteRemoteFile(String filename) throws ClientException { try { this.channelSftp.rm(filename); } catch (SftpException e) { StringBuilder sb = new StringBuilder(384); sb.append("Exception while deleting source file or directory ["); //$NON-NLS-1$ sb.append(filename); sb.append(']'); logger.debug("Exception thrown whilst deleting file or directory [" + e + "]"); //$NON-NLS-1$ //$NON-NLS-2$ throw new ClientException(sb.toString(), e); } }
sb.append(path); sb.append(']'); throw new ClientException(sb.toString(), e);
throw new ClientException("Could not get working directory.", e); throw new ClientException("Could not get working directory."); throw new ClientException("Could not change working directory to [" + pathElement + "]"); throw new ClientException("Could not change working directory to [" + pathElement + "]", e); throw new ClientException("Failed to create path element [" + pathElement + "] of path [" + newPath + "]"); throw new ClientException("Failed to navigate to path element [" + pathElement + "] of path [" + newPath + "]"); throw new ClientException("Failed to create & navigate to path element [" + pathElement + "] of path [" + newPath + "]", e); throw new ClientException("Failed to reset working directory to [" + cwd + "]"); throw new ClientException("Failed to reset working directory to [" + cwd + "]", e);
throw new ClientException("Could not get working directory.", e); throw new ClientException("Could not get working directory."); throw new ClientException("Could not change working directory to [" + pathElement + "]"); throw new ClientException("Could not change working directory to [" + pathElement + "]", e); throw new ClientException("Failed to create path element [" + pathElement + "] of path [" + newPath + "]"); throw new ClientException("Failed to navigate to path element [" + pathElement + "] of path [" + newPath + "]"); throw new ClientException("Failed to create & navigate to path element [" + pathElement + "] of path [" + newPath + "]", e); throw new ClientException("Failed to reset working directory to [" + cwd + "]"); throw new ClientException("Failed to reset working directory to [" + cwd + "]", e);
sb.append(']'); throw new ClientException(sb.toString(), e);
throw new ClientException(e); throw new ClientException(sb.toString(), e); sb.append(file.toString()); sb.append(']'); throw new ClientException(sb.toString(), e); sb.append(']'); throw new ClientException(sb.toString(), e); sb.append(']'); logger.warn(sb.toString(), e); throw new ClientException(sb.toString(), e);
if (!this.ftpClient.changeWorkingDirectory(dir)) throw new ClientException("Unable to change dir to: [" + path + "]"); throw new ClientException("Unable to change dir back to: [" + startDir + "]"); sb.append(path); sb.append(']'); throw new ClientException(sb.toString(), e);
if (!this.ftpClient.changeWorkingDirectory(dir)) throw new ClientException("Unable to change dir to: [" + path + "]"); throw new ClientException("Unable to change dir back to: [" + startDir + "]"); sb.append(path); sb.append(']'); throw new ClientException(sb.toString(), e);
sb.append(']'); logger.debug("Exception thrown whilst deleting directory [" + e + "]"); //$NON-NLS-1$ //$NON-NLS-2$ throw new ClientException(sb.toString(), e);
throw new ClientException("Exception while deleting directory [" + directoryPath + "]"); throw new ClientException("Exception while deleting directory [" + directoryPath + "]", e);
throw new ClientException("Exception while deleting directory [" + directoryPath + "]"); throw new ClientException("Exception while deleting directory [" + directoryPath + "]", e);