/** * {@inheritDoc} */ public boolean hasChildren(String path) throws FileSystemException { return fsBase.hasChildren(buildBasePath(path)); }
/** * {@inheritDoc} */ public boolean hasChildren(String path) throws FileSystemException { return fsBase.hasChildren(buildBasePath(path)); }
/** * {@inheritDoc} */ public boolean hasChildren(String path) throws FileSystemException { return fsBase.hasChildren(buildBasePath(path)); }
/** * Deletes this resource. * * @param pruneEmptyParentDirs if <code>true</code>, empty parent folders will * automatically be deleted * @see FileSystem#deleteFile */ public synchronized void delete(boolean pruneEmptyParentDirs) throws FileSystemException { fs.deleteFile(path); if (pruneEmptyParentDirs) { // prune empty parent folders String parentDir = FileSystemPathUtil.getParentDir(path); while (!parentDir.equals(FileSystem.SEPARATOR) && fs.exists(parentDir) && !fs.hasChildren(parentDir)) { fs.deleteFolder(parentDir); parentDir = FileSystemPathUtil.getParentDir(parentDir); } } }
/** * Deletes this resource. * * @param pruneEmptyParentDirs if <code>true</code>, empty parent folders will * automatically be deleted * @see FileSystem#deleteFile */ public synchronized void delete(boolean pruneEmptyParentDirs) throws FileSystemException { fs.deleteFile(path); if (pruneEmptyParentDirs) { // prune empty parent folders String parentDir = FileSystemPathUtil.getParentDir(path); while (!parentDir.equals(FileSystem.SEPARATOR) && fs.exists(parentDir) && !fs.hasChildren(parentDir)) { fs.deleteFolder(parentDir); parentDir = FileSystemPathUtil.getParentDir(parentDir); } } }
/** * Deletes this resource. * * @param pruneEmptyParentDirs if <code>true</code>, empty parent folders will * automatically be deleted * @see FileSystem#deleteFile */ public synchronized void delete(boolean pruneEmptyParentDirs) throws FileSystemException { fs.deleteFile(path); if (pruneEmptyParentDirs) { // prune empty parent folders String parentDir = FileSystemPathUtil.getParentDir(path); while (!parentDir.equals(FileSystem.SEPARATOR) && fs.exists(parentDir) && !fs.hasChildren(parentDir)) { fs.deleteFolder(parentDir); parentDir = FileSystemPathUtil.getParentDir(parentDir); } } }