42 lines
1.0 KiB
Java
42 lines
1.0 KiB
Java
package com.bumptech.glide.disklrucache;
|
|
|
|
import java.io.Closeable;
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
import java.nio.charset.Charset;
|
|
|
|
/* loaded from: classes.dex */
|
|
final class Util {
|
|
static final Charset a = Charset.forName("US-ASCII");
|
|
|
|
static {
|
|
Charset.forName("UTF-8");
|
|
}
|
|
|
|
static void a(File file) throws IOException {
|
|
File[] listFiles = file.listFiles();
|
|
if (listFiles == null) {
|
|
throw new IOException("not a readable directory: " + file);
|
|
}
|
|
for (File file2 : listFiles) {
|
|
if (file2.isDirectory()) {
|
|
a(file2);
|
|
}
|
|
if (!file2.delete()) {
|
|
throw new IOException("failed to delete file: " + file2);
|
|
}
|
|
}
|
|
}
|
|
|
|
static void a(Closeable closeable) {
|
|
if (closeable != null) {
|
|
try {
|
|
closeable.close();
|
|
} catch (RuntimeException e) {
|
|
throw e;
|
|
} catch (Exception unused) {
|
|
}
|
|
}
|
|
}
|
|
}
|