35 lines
999 B
Java
35 lines
999 B
Java
|
package d0.y;
|
||
|
|
||
|
import d0.g0.w;
|
||
|
import d0.z.d.m;
|
||
|
import java.io.File;
|
||
|
import java.util.Iterator;
|
||
|
/* compiled from: Utils.kt */
|
||
|
public class h extends g {
|
||
|
public static final boolean deleteRecursively(File file) {
|
||
|
m.checkNotNullParameter(file, "$this$deleteRecursively");
|
||
|
Iterator<File> it = g.walkBottomUp(file).iterator();
|
||
|
while (true) {
|
||
|
boolean z2 = true;
|
||
|
while (true) {
|
||
|
if (!it.hasNext()) {
|
||
|
return z2;
|
||
|
}
|
||
|
File next = it.next();
|
||
|
if (next.delete() || !next.exists()) {
|
||
|
if (z2) {
|
||
|
}
|
||
|
}
|
||
|
z2 = false;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static final String getExtension(File file) {
|
||
|
m.checkNotNullParameter(file, "$this$extension");
|
||
|
String name = file.getName();
|
||
|
m.checkNotNullExpressionValue(name, "name");
|
||
|
return w.substringAfterLast(name, '.', "");
|
||
|
}
|
||
|
}
|