MCPcopy Index your code
hub / github.com/benfry/processing4 / listFilesImpl

Method listFilesImpl

app/src/processing/app/Util.java:491–509  ·  view source on GitHub ↗
(File folder, boolean relative,
                            String extension, StringList list)

Source from the content-addressed store, hash-verified

489
490
491 static void listFilesImpl(File folder, boolean relative,
492 String extension, StringList list) {
493 File[] items = folder.listFiles();
494 if (items != null) {
495 for (File item : items) {
496 String name = item.getName();
497 if (name.charAt(0) != '.') {
498 if (item.isDirectory()) {
499 listFilesImpl(item, relative, extension, list);
500
501 } else { // a file
502 if (extension == null || name.endsWith(extension)) {
503 list.append(item.getAbsolutePath());
504 }
505 }
506 }
507 }
508 }
509 }
510
511
512 /**

Callers 1

listFilesMethod · 0.95

Calls 3

listFilesMethod · 0.45
getNameMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected