File collecting

its not efficient
This commit is contained in:
DanLT 2021-07-06 06:43:01 -08:00
parent 559f37e5d2
commit a068bda34f

View File

@ -41,6 +41,30 @@ public class IrisProject
return activeProvider != null; return activeProvider != null;
} }
public KList<File> collectFiles(File f, String json)
{
KList<File> l = new KList<>();
if(f.isDirectory())
{
for(File i : f.listFiles())
{
l.addAll(collectFiles(i, json));
}
}
else if(f.getName().endsWith("."+json))
{
l.add(f);
}
return l;
}
public KList<File> collectFiles(String json) {
return collectFiles(path, json);
}
public void open(MortarSender sender) public void open(MortarSender sender)
{ {
open(sender, () -> open(sender, () ->