- static Collection<File> listFiles(final File root, final Collection<File> excludedFiles)
- throws FileNotFoundException {
- if (!root.exists()) {
- LOG.warn("{} YANG source directory {} not found. No code will be generated.", LOG_PREFIX, root);
-
- return Collections.emptyList();
- }
- Collection<File> result = new ArrayList<>();
- Collection<File> yangFiles = FileUtils.listFiles(root, new String[] { YANG_SUFFIX }, true);
- for (File f : yangFiles) {
- if (excludedFiles.contains(f)) {
- LOG.info("{} {} file excluded {}", LOG_PREFIX, Util.YANG_SUFFIX.toUpperCase(), f);
- } else {
- result.add(f);
- }
- }
-
- return result;
- }
-