Adds the relative paths of all descendant files to the specified list. @param io current file @param files file list @param filter file filter @param offset string length of root path
(final IOFile io, final StringList files,
final FileFilter filter, final int offset)
| 434 | * @param offset string length of root path |
| 435 | */ |
| 436 | private static void addDescendants(final IOFile io, final StringList files, |
| 437 | final FileFilter filter, final int offset) { |
| 438 | if(io.isDir()) { |
| 439 | for(final IOFile child : io.children(filter)) { |
| 440 | addDescendants(child, files, filter, offset); |
| 441 | } |
| 442 | } else if(filter == null || filter.accept(io.file)) { |
| 443 | files.add(io.path().substring(offset)); |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | /** |
| 448 | * Checks if the specified string is a valid file name. |