/** * Get the files in the folder specified, provided that the filter returns true. * A filter is given each file and its type, and decides which files should be returned * and which should be discarded. To classify files into their type, we read transaction * log files. Should we fail to read these log files after a few times, we look at onTxnErr * to determine what to do. * * @param folder - the folder to scan * @param onTxnErr - how to handle a failure to read a txn log file * @param filter - A function that receives each file and its type, it should return true to have the file returned * @return - the list of files that were scanned and for which the filter returned true */ public static List<File> getFiles(Path folder, BiFunction<File, Directories.FileType, Boolean> filter, Directories.OnTxnErr onTxnErr) { return new LogAwareFileLister(folder, filter, onTxnErr).list(); }
/** * Get the files in the folder specified, provided that the filter returns true. * A filter is given each file and its type, and decides which files should be returned * and which should be discarded. To classify files into their type, we read transaction * log files. Should we fail to read these log files after a few times, we look at onTxnErr * to determine what to do. * * @param folder - the folder to scan * @param onTxnErr - how to handle a failure to read a txn log file * @param filter - A function that receives each file and its type, it should return true to have the file returned * @return - the list of files that were scanned and for which the filter returned true */ public static List<File> getFiles(Path folder, BiFunction<File, Directories.FileType, Boolean> filter, Directories.OnTxnErr onTxnErr) { return new LogAwareFileLister(folder, filter, onTxnErr).list(); }
/** * Get the files in the folder specified, provided that the filter returns true. * A filter is given each file and its type, and decides which files should be returned * and which should be discarded. To classify files into their type, we read transaction * log files. Should we fail to read these log files after a few times, we look at onTxnErr * to determine what to do. * * @param folder - the folder to scan * @param onTxnErr - how to handle a failure to read a txn log file * @param filter - A function that receives each file and its type, it should return true to have the file returned * @return - the list of files that were scanned and for which the filter returned true */ public static List<File> getFiles(Path folder, BiFunction<File, Directories.FileType, Boolean> filter, Directories.OnTxnErr onTxnErr) { return new LogAwareFileLister(folder, filter, onTxnErr).list(); }
/** * Get the files in the folder specified, provided that the filter returns true. * A filter is given each file and its type, and decides which files should be returned * and which should be discarded. To classify files into their type, we read transaction * log files. Should we fail to read these log files after a few times, we look at onTxnErr * to determine what to do. * * @param folder - the folder to scan * @param onTxnErr - how to handle a failure to read a txn log file * @param filter - A function that receives each file and its type, it should return true to have the file returned * @return - the list of files that were scanned and for which the filter returned true */ public static List<File> getFiles(Path folder, BiFunction<File, Directories.FileType, Boolean> filter, Directories.OnTxnErr onTxnErr) { return new LogAwareFileLister(folder, filter, onTxnErr).list(); }