Class DirectoryScan
java.lang.Object
net.bluemind.node.shared.DirectoryScan
-
Method Summary
-
Method Details
-
page
public static DirectoryPage page(Path directory, Predicate<String> nameFilter, int pageSize, String after) throws IOException Read one page of regular files from a directory, ordered by file name. Only thepageSizesmallest names aboveafterare held in memory, so a directory with millions of entries is neither materialized nor sorted as a whole.- Parameters:
directory- scanned directory, not recursed intonameFilter- keeps the file names to returnpageSize- maximum number of entries in the pageafter- name of the last entry of the previous page, null to start at the beginning of the directory- Returns:
- an empty page when the directory does not exist
- Throws:
IOException
-