/** * Rename the file from oldPath to newPath * * @param oldPath Original Path * @param newPath New Path * @throws ResourceException when renaming a file fails */ protected void renameFile(String oldPath, String newPath) throws ResourceException { if(logger.isDebugEnabled()) { logger.debug("Renaming file from [" + oldPath + "] to [" //$NON-NLS-1$ //$NON-NLS-2$ + newPath + "]"); //$NON-NLS-1$ } try { getClient().ensureConnection(); this.getClient().rename(oldPath, newPath); } catch (ClientCommandRenameException e) { logger.warn("Failed to rename file [" + oldPath //$NON-NLS-1$ + "] to [" + newPath //$NON-NLS-1$ + "]. Exception occured [" + e.getMessage() + "]", e); //$NON-NLS-1$ //$NON-NLS-2$ throw new ResourceException(e); } }