/** Lists all files (including subdirectories) in the directory. * * @throws IOException if there was an I/O error during listing */ public static String[] listAll(Path dir) throws IOException { return listAll(dir, null); }
@Override public String[] listAll() throws IOException { ensureOpen(); return listAll(directory, pendingDeletes); }
private RAMDirectory(FSDirectory dir, boolean closeDir, IOContext context) throws IOException { this(); for (String file : dir.listAll()) { if (!Files.isDirectory(dir.getDirectory().resolve(file))) { copyFrom(dir, file, file, context); } } if (closeDir) { dir.close(); } }
@Override public String[] listAll() throws IOException { return fsDir.listAll(); }
/** Lists all files (including subdirectories) in the directory. * * @throws IOException if there was an I/O error during listing */ public static String[] listAll(Path dir) throws IOException { return listAll(dir, null); }
@Override public String[] listAll() throws IOException { ensureOpen(); return listAll(directory); }
/** Lists all files (not subdirectories) in the * directory. * @see #listAll(File) */ @Override public String[] listAll() throws IOException { ensureOpen(); return listAll(directory); }
@Override public String[] listAll() throws IOException { ensureOpen(); return listAll(directory, pendingDeletes); }
@Override public String[] listAll() throws IOException { ensureOpen(); return listAll(directory); }
private RAMDirectory(FSDirectory dir, boolean closeDir, IOContext context) throws IOException { this(); for (String file : dir.listAll()) { if (!Files.isDirectory(dir.getDirectory().resolve(file))) { copyFrom(dir, file, file, context); } } if (closeDir) { dir.close(); } }
private RAMDirectory(FSDirectory dir, boolean closeDir, IOContext context) throws IOException { this(); for (String file : dir.listAll()) { if (!Files.isDirectory(dir.getDirectory().resolve(file))) { copyFrom(dir, file, file, context); } } if (closeDir) { dir.close(); } }
private RAMDirectory(FSDirectory dir, boolean closeDir, IOContext context) throws IOException { this(); for (String file : dir.listAll()) { if (!Files.isDirectory(dir.getDirectory().resolve(file))) { copyFrom(dir, file, file, context); } } if (closeDir) { dir.close(); } }
for (String fileName : oldDir.listAll()) { newDir.copyFrom(oldDir, fileName, fileName, IOContext.DEFAULT);