- for (File f: file.listFiles()) {
- // System.err.printf(" -> file %s %s\n", file, file.getName());
-
- if (f.getName().startsWith(".")) {
- // Hide dot-files
- continue;
- }
- if (!f.isDirectory()) {
- continue;
- }
+ File [] listFiles = file.listFiles();
+ if (listFiles != null) {
+ for (File f: listFiles) {
+ // System.err.printf(" -> file %s %s\n", file, file.getName());
+
+ if (f.getName().startsWith(".")) {
+ // Hide dot-files
+ continue;
+ }
+ if (!f.isDirectory()) {
+ continue;
+ }