mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 10:43:14 +00:00
File collecting
its not efficient
This commit is contained in:
parent
559f37e5d2
commit
a068bda34f
@ -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, () ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user