mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-30 15:29:51 +00:00
initial commit
This commit is contained in:
parent
16394be6ec
commit
f1d9bd35a3
11 changed files with 145 additions and 122 deletions
|
|
@ -840,6 +840,25 @@ public class VectrasApp extends Application {
|
|||
return "";
|
||||
}
|
||||
|
||||
public static void startCleanUp() {
|
||||
String _romsdata = VectrasApp.readFile(AppConfig.maindirpath + "roms-data.json").replace("\\/", "/");
|
||||
int _startRepeat = 0;
|
||||
ArrayList<String> _filelist = new ArrayList<>();
|
||||
listDir(AppConfig.maindirpath + "roms/", _filelist);
|
||||
if (!_filelist.isEmpty()) {
|
||||
for (int _repeat = 0; _repeat < (int)(_filelist.size()); _repeat++) {
|
||||
if (_startRepeat < _filelist.size()) {
|
||||
if (!isFileExists(_filelist.get((int)(_startRepeat)) + "/vmID.txt")) {
|
||||
if (!_romsdata.contains(_filelist.get((int)(_startRepeat)))) {
|
||||
deleteDirectory(_filelist.get((int)(_startRepeat)));
|
||||
}
|
||||
}
|
||||
}
|
||||
_startRepeat++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isADiskFile (String _filepath) {
|
||||
if (_filepath.contains(".")) {
|
||||
String _getFileName = Objects.requireNonNull(Uri.parse(_filepath).getLastPathSegment()).toLowerCase();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue