/** * Filter files/directories in the given path using the user-supplied path * filter. * * @param f is the path name * @param filter is the user-supplied path filter * * @return an array of FileStatus objects for the files under the given path * after applying the filter * * @throws AccessControlException If access is denied * @throws FileNotFoundException If <code>f</code> does not exist * @throws UnsupportedFileSystemException If file system for * <code>pathPattern</code> is not supported * @throws IOException If an I/O error occurred * * Exceptions applicable to file systems accessed over RPC: * @throws RpcClientException If an exception occurred in the RPC client * @throws RpcServerException If an exception occurred in the RPC server * @throws UnexpectedServerException If server implementation throws * undeclared exception to RPC server */ public FileStatus[] listStatus(Path f, PathFilter filter) throws AccessControlException, FileNotFoundException, UnsupportedFileSystemException, IOException { ArrayList<FileStatus> results = new ArrayList<FileStatus>(); listStatus(results, f, filter); return results.toArray(new FileStatus[results.size()]); }
/** * Filter files/directories in the given list of paths using user-supplied * path filter. * * @param files is a list of paths * @param filter is the filter * * @return a list of statuses for the files under the given paths after * applying the filter * * @throws AccessControlException If access is denied * @throws FileNotFoundException If a file in <code>files</code> does not * exist * @throws IOException If an I/O error occurred * * Exceptions applicable to file systems accessed over RPC: * @throws RpcClientException If an exception occurred in the RPC client * @throws RpcServerException If an exception occurred in the RPC server * @throws UnexpectedServerException If server implementation throws * undeclared exception to RPC server */ public FileStatus[] listStatus(Path[] files, PathFilter filter) throws AccessControlException, FileNotFoundException, IOException { ArrayList<FileStatus> results = new ArrayList<FileStatus>(); for (int i = 0; i < files.length; i++) { listStatus(results, files[i], filter); } return results.toArray(new FileStatus[results.size()]); }
private void listStatus(ArrayList<FileStatus> results, Path f, PathFilter filter) throws AccessControlException, FileNotFoundException, IOException { FileStatus[] listing = listStatus(f); if (listing != null) { for (int i = 0; i < listing.length; i++) { if (filter.accept(listing[i].getPath())) { results.add(listing[i]); } } } }
private void listStatus(ArrayList<FileStatus> results, Path f, PathFilter filter) throws AccessControlException, FileNotFoundException, IOException { FileStatus[] listing = listStatus(f); if (listing != null) { for (int i = 0; i < listing.length; i++) { if (filter.accept(listing[i].getPath())) { results.add(listing[i]); } } } }
private void listStatus(ArrayList<FileStatus> results, Path f, PathFilter filter) throws AccessControlException, FileNotFoundException, IOException { FileStatus[] listing = listStatus(f); if (listing != null) { for (int i = 0; i < listing.length; i++) { if (filter.accept(listing[i].getPath())) { results.add(listing[i]); } } } }
/** * See {@link #listStatus(Path[], PathFilter)} */ public FileStatus[] listStatus(Path[] files) throws AccessControlException, FileNotFoundException, IOException { return listStatus(files, DEFAULT_FILTER); }
private FileStatus[] listStatus(Path path) throws IOException { try { if (fs != null) { return fs.listStatus(path); } else { return fc.util().listStatus(path); } } catch (FileNotFoundException e) { return new FileStatus[0]; } }
private FileStatus[] listStatus(Path path, boolean isDirectory) throws IOException { try { if (fs != null) { return fs.listStatus(path, filter, true, isDirectory); } else { return fc.util().listStatus(path); } } catch (FileNotFoundException e) { return new FileStatus[0]; } }
private FileStatus[] listStatus(Path path) throws IOException { try { if (fs != null) { return fs.listStatus(path); } else { return fc.util().listStatus(path); } } catch (FileNotFoundException e) { return new FileStatus[0]; } }
private void listStatus(ArrayList<FileStatus> results, Path f, PathFilter filter) throws AccessControlException, FileNotFoundException, IOException { FileStatus[] listing = listStatus(f); if (listing != null) { for (int i = 0; i < listing.length; i++) { if (filter.accept(listing[i].getPath())) { results.add(listing[i]); } } } }
private FileStatus[] listStatus(Path path) throws IOException { try { if (fs != null) { return fs.listStatus(path); } else { return fc.util().listStatus(path); } } catch (FileNotFoundException e) { return new FileStatus[0]; } }
private void listStatus(ArrayList<FileStatus> results, Path f, PathFilter filter) throws AccessControlException, FileNotFoundException, IOException { FileStatus[] listing = listStatus(f); if (listing != null) { for (int i = 0; i < listing.length; i++) { if (filter.accept(listing[i].getPath())) { results.add(listing[i]); } } } }
/** * See {@link #listStatus(Path[], PathFilter)} */ public FileStatus[] listStatus(Path[] files) throws AccessControlException, FileNotFoundException, IOException { return listStatus(files, DEFAULT_FILTER); }
@Override public FileStatus[] listStatus(Path f) throws AccessControlException, FileNotFoundException, UnsupportedFileSystemException, IOException { return fc.util().listStatus(f); }
/** * See {@link #listStatus(Path[], PathFilter)} */ public FileStatus[] listStatus(Path[] files) throws AccessControlException, FileNotFoundException, IOException { return listStatus(files, DEFAULT_FILTER); }
private FileStatus[] listStatus(Path path, boolean isDirectory) throws IOException { try { if (fs != null) { return fs.listStatus(path, filter, true, isDirectory); } else { return fc.util().listStatus(path); } } catch (FileNotFoundException e) { return new FileStatus[0]; } }
/** * See {@link #listStatus(Path[], PathFilter)} */ public FileStatus[] listStatus(Path[] files) throws AccessControlException, FileNotFoundException, IOException { return listStatus(files, DEFAULT_FILTER); }
checkDependencies(qSrc, qDst); mkdir(qDst, FsPermission.getDirDefault(), true); FileStatus[] contents = listStatus(qSrc); for (FileStatus content : contents) { copy(makeQualified(content.getPath()), makeQualified(new Path(qDst,
/** * See {@link #listStatus(Path[], PathFilter)} */ public FileStatus[] listStatus(Path[] files) throws AccessControlException, FileNotFoundException, IOException { return listStatus(files, DEFAULT_FILTER); }
private FileStatus[] listStatus(Path path) throws IOException { try { if (fs != null) { return fs.listStatus(path); } else { return fc.util().listStatus(path); } } catch (FileNotFoundException e) { return new FileStatus[0]; } }