initial commit

This commit is contained in:
xoureldeen 2024-10-30 02:31:17 +03:00
parent 16394be6ec
commit f1d9bd35a3
11 changed files with 145 additions and 122 deletions

View file

@ -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();