Files
rr3-apk/decompiled-community/sources/com/helpshift/util/FileUtil.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

64 lines
2.0 KiB
Java

package com.helpshift.util;
import com.helpshift.log.HSLogger;
import java.io.File;
import java.io.FileInputStream;
/* loaded from: classes3.dex */
public abstract class FileUtil {
public static String readFileToString(String str) {
FileInputStream fileInputStream;
Exception e;
FileInputStream fileInputStream2 = null;
try {
File file = new File(str);
fileInputStream = new FileInputStream(file);
try {
try {
int length = (int) file.length();
byte[] bArr = new byte[length];
fileInputStream.read(bArr, 0, length);
String str2 = new String(bArr);
Utils.closeQuietly(fileInputStream);
return str2;
} catch (Exception e2) {
e = e2;
HSLogger.e("fileutil", "Error reading file: " + str, e);
Utils.closeQuietly(fileInputStream);
return "";
}
} catch (Throwable th) {
th = th;
fileInputStream2 = fileInputStream;
Utils.closeQuietly(fileInputStream2);
throw th;
}
} catch (Exception e3) {
fileInputStream = null;
e = e3;
} catch (Throwable th2) {
th = th2;
Utils.closeQuietly(fileInputStream2);
throw th;
}
}
public static void deleteDir(String str) {
File file = new File(str);
if (file.exists()) {
File[] listFiles = file.listFiles();
if (listFiles == null || listFiles.length == 0) {
file.delete();
return;
}
for (File file2 : listFiles) {
if (file2.isDirectory()) {
deleteDir(file2.getAbsolutePath());
}
file2.delete();
}
file.delete();
}
}
}