File[] childArr = dir.listFiles();
// dir.listFiles() can return null, because of "(Access denied)" / "(Zugriff verweigert)"
if (childArr == null) {
if (dir.canRead() == false) {
throw new RegainException("canRead() on file returned: false. Maybe no access rights for sourceURL: " + sourceUrl);
} else {
throw new RegainException("listFiles() returned: null array. Maybe no access rights for sourceURL: " + sourceUrl);
}
}
for (int childIdx = 0; childIdx < childArr.length; childIdx++) {
// Get the URL for the current child file