/** * Checks that given directory is empty, throwing {@link DirectoryNotEmptyException} if not. */ private void checkEmpty(Directory dir, Path pathForException) throws FileSystemException { if (!dir.isEmpty()) { throw new DirectoryNotEmptyException(pathForException.toString()); } }
/** * Checks that given directory is empty, throwing {@link DirectoryNotEmptyException} if not. */ private void checkEmpty(Directory dir, Path pathForException) throws FileSystemException { if (!dir.isEmpty()) { throw new DirectoryNotEmptyException(pathForException.toString()); } }