mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-29 22:04:25 +02:00
recursive apk fire search
This commit is contained in:
parent
67ee76ded9
commit
59d5279b7b
@ -127,10 +127,18 @@ public class ApkBundle {
|
||||
return new ArrayList<>(mModulesMap.values());
|
||||
}
|
||||
public void loadApkDirectory(File dir) throws IOException{
|
||||
loadApkDirectory(dir, false);
|
||||
}
|
||||
public void loadApkDirectory(File dir, boolean recursive) throws IOException {
|
||||
if(!dir.isDirectory()){
|
||||
throw new FileNotFoundException("No such directory: "+dir);
|
||||
}
|
||||
List<File> apkList=ApkUtil.listFiles(dir, ".apk");
|
||||
List<File> apkList;
|
||||
if(recursive){
|
||||
apkList = ApkUtil.recursiveFiles(dir, ".apk");
|
||||
}else {
|
||||
apkList = ApkUtil.listFiles(dir, ".apk");
|
||||
}
|
||||
if(apkList.size()==0){
|
||||
throw new FileNotFoundException("No '*.apk' files in directory: "+dir);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user