/** * Deletes the file. */ @Override protected void doDelete() throws Exception { file.delete(); }
/** * Deletes the file. */ @Override protected void doDelete() throws Exception { file.delete(); }
@Override public void delete() throws IOException { file.delete(); checkSmbFile(false); }
public void delete(String file) throws IOException, InterruptedException { $(file).delete(); }
public void delete(String file) throws IOException, InterruptedException { $(file).delete(); }
@Override public boolean rmdir(String directory) throws IOException { SmbFile dir = createSmbDirectoryObject(directory); try { dir.delete(); } catch (SmbException e) { if (logger.isWarnEnabled()) { logger.info("Failed to remove remote directory [" + directory + "]: " + e); } return false; } if (logger.isInfoEnabled()) { logger.info("Successfully removed remote directory [" + directory + "]."); } return true; }
/** * Deletes the file or directory at the specified path. * @param _path path to a remote file or directory * @return true if delete successful, false if resource is non-existent * @throws IOException on error conditions returned by a CIFS server */ @Override public boolean remove(String _path) throws IOException { Assert.hasText(_path, "path must not be empty"); boolean removed = false; SmbFile removeFile = createSmbFileObject(_path); if (removeFile.exists()) { removeFile.delete(); removed = true; } if (!removed && logger.isInfoEnabled()) { logger.info("Could not remove non-existing resource [" + _path + "]."); } else if (logger.isInfoEnabled()) { logger.info("Successfully removed resource [" + _path + "]."); } return removed; }
/** * This method will delete the file or directory specified by this * <code>SmbFile</code>. If the target is a directory, the contents of * the directory will be deleted as well. If a file within the directory or * it's sub-directories is marked read-only, the read-only status will * be removed and the file will be deleted. * * @throws SmbException */ public void delete() throws SmbException { exists(); getUncPath0(); delete( unc ); } void delete( String fileName ) throws SmbException {
/** * This method will delete the file or directory specified by this * <code>SmbFile</code>. If the target is a directory, the contents of * the directory will be deleted as well. If a file within the directory or * it's sub-directories is marked read-only, the read-only status will * be removed and the file will be deleted. * * @throws SmbException */ public void delete() throws SmbException { exists(); getUncPath0(); delete( unc ); } void delete( String fileName ) throws SmbException {
/** * This method will delete the file or directory specified by this * <code>SmbFile</code>. If the target is a directory, the contents of * the directory will be deleted as well. If a file within the directory or * it's sub-directories is marked read-only, the read-only status will * be removed and the file will be deleted. * * @throws SmbException */ public void delete() throws SmbException { exists(); getUncPath0(); delete( unc ); } void delete( String fileName ) throws SmbException {
/** * This method will delete the file or directory specified by this * <code>SmbFile</code>. If the target is a directory, the contents of * the directory will be deleted as well. If a file within the directory or * it's sub-directories is marked read-only, the read-only status will * be removed and the file will be deleted. * * @throws SmbException */ public void delete() throws SmbException { exists(); getUncPath0(); delete( unc ); } void delete( String fileName ) throws SmbException {
@Override public void delete () throws SmbException { try { delete(this.fileLocator.getUNCPath()); } catch ( CIFSException e ) { throw SmbException.wrap(e); } close(); }
@Override public void delete () throws SmbException { try { delete(this.fileLocator.getUNCPath()); } catch ( CIFSException e ) { throw SmbException.wrap(e); } close(); }
@Override public void rename(String _pathFrom, String _pathTo) throws IOException { try { SmbFile smbFileFrom = createSmbFileObject(_pathFrom); SmbFile smbFileTo = createSmbFileObject(_pathTo); if (this.smbShare.isReplaceFile() && smbFileTo.exists()) { smbFileTo.delete(); } smbFileFrom.renameTo(smbFileTo); } catch (SmbException _ex) { throw new NestedIOException("Failed to rename [" + _pathFrom + "] to [" + _pathTo + "].", _ex); } if (logger.isInfoEnabled()) { logger.info("Successfully renamed remote resource [" + _pathFrom + "] to [" + _pathTo + "]."); } }
public void pullUp(String from, String to) throws IOException, InterruptedException { SmbFile src = $(from); SmbFile dst = $(to); for (SmbFile e : src.listFiles()) { e.renameTo(new SmbFile(dst,e.getName())); } src.delete(); }
public void pullUp(String from, String to) throws IOException, InterruptedException { SmbFile src = $(from); SmbFile dst = $(to); for (SmbFile e : src.listFiles()) { e.renameTo(new SmbFile(dst,e.getName())); } src.delete(); }
SmbFile[] l = listFiles( "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, null, null ); for( int i = 0; i < l.length; i++ ) { l[i].delete();
SmbFile[] l = listFiles( "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, null, null ); for( int i = 0; i < l.length; i++ ) { l[i].delete();
SmbFile[] l = listFiles( "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, null, null ); for( int i = 0; i < l.length; i++ ) { l[i].delete();