Files
rr3-apk/decompiled-community/sources/kotlin/io/FilesKt__FilePathComponentsKt.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

40 lines
1.7 KiB
Java

package kotlin.io;
import java.io.File;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsKt;
/* loaded from: classes5.dex */
public abstract class FilesKt__FilePathComponentsKt {
public static final int getRootLength$FilesKt__FilePathComponentsKt(String str) {
boolean endsWith$default;
int indexOf$default;
char c = File.separatorChar;
int indexOf$default2 = StringsKt__StringsKt.indexOf$default((CharSequence) str, c, 0, false, 4, (Object) null);
if (indexOf$default2 == 0) {
if (str.length() <= 1 || str.charAt(1) != c || (indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) str, c, 2, false, 4, (Object) null)) < 0) {
return 1;
}
int indexOf$default3 = StringsKt__StringsKt.indexOf$default((CharSequence) str, c, indexOf$default + 1, false, 4, (Object) null);
return indexOf$default3 >= 0 ? indexOf$default3 + 1 : str.length();
}
if (indexOf$default2 > 0 && str.charAt(indexOf$default2 - 1) == ':') {
return indexOf$default2 + 1;
}
if (indexOf$default2 == -1) {
endsWith$default = StringsKt__StringsKt.endsWith$default((CharSequence) str, ':', false, 2, (Object) null);
if (endsWith$default) {
return str.length();
}
}
return 0;
}
public static final boolean isRooted(File file) {
Intrinsics.checkNotNullParameter(file, "<this>");
String path = file.getPath();
Intrinsics.checkNotNullExpressionValue(path, "getPath(...)");
return getRootLength$FilesKt__FilePathComponentsKt(path) > 0;
}
}