package o1; import java.io.Closeable; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; /* loaded from: classes.dex */ abstract class d { /* renamed from: a, reason: collision with root package name */ static final Charset f12661a = Charset.forName("US-ASCII"); /* renamed from: b, reason: collision with root package name */ static final Charset f12662b = Charset.forName("UTF-8"); static void a(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (RuntimeException e10) { throw e10; } catch (Exception unused) { } } } static void b(File file) { File[] listFiles = file.listFiles(); if (listFiles == null) { throw new IOException("not a readable directory: " + file); } for (File file2 : listFiles) { if (file2.isDirectory()) { b(file2); } if (!file2.delete()) { throw new IOException("failed to delete file: " + file2); } } } }