1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-15 13:55:03 -05:00

* helper method that could be useful in scripts and otherwise

This commit is contained in:
Reinhard Pointner 2014-07-17 07:50:30 +00:00
parent 76073cfb9d
commit 7385a8d307

View File

@ -1371,6 +1371,21 @@ public class MediaDetection {
}
};
public static List<File> getMediaUnits(File folder) {
if (folder.isHidden()) {
return emptyList();
}
if (folder.isDirectory() && !isDiskFolder(folder)) {
List<File> children = new ArrayList<File>();
for (File f : getChildren(folder)) {
children.addAll(getMediaUnits(f));
}
}
return singletonList(folder);
}
public static Object readMetaInfo(File file) {
if (useExtendedFileAttributes()) {
try {