- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
428 lines
10 KiB
Smali
428 lines
10 KiB
Smali
.class public abstract Lkotlin/io/FilesKt__UtilsKt;
|
|
.super Lkotlin/io/FilesKt__FileTreeWalkKt;
|
|
.source "SourceFile"
|
|
|
|
|
|
# direct methods
|
|
.method public static final copyTo(Ljava/io/File;Ljava/io/File;ZI)Ljava/io/File;
|
|
.locals 6
|
|
|
|
const-string v0, "<this>"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "target"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 218
|
|
invoke-virtual {p0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
.line 222
|
|
invoke-virtual {p1}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 225
|
|
invoke-virtual {p1}, Ljava/io/File;->delete()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 226
|
|
:cond_0
|
|
new-instance p2, Lkotlin/io/FileAlreadyExistsException;
|
|
|
|
const-string p3, "Tried to overwrite the destination, but failed to delete it."
|
|
|
|
invoke-direct {p2, p0, p1, p3}, Lkotlin/io/FileAlreadyExistsException;-><init>(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
.line 224
|
|
:cond_1
|
|
new-instance p2, Lkotlin/io/FileAlreadyExistsException;
|
|
|
|
const-string p3, "The destination file already exists."
|
|
|
|
invoke-direct {p2, p0, p1, p3}, Lkotlin/io/FileAlreadyExistsException;-><init>(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
.line 229
|
|
:cond_2
|
|
:goto_0
|
|
invoke-virtual {p0}, Ljava/io/File;->isDirectory()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
.line 230
|
|
invoke-virtual {p1}, Ljava/io/File;->mkdirs()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
.line 231
|
|
:cond_3
|
|
new-instance p2, Lkotlin/io/FileSystemException;
|
|
|
|
const-string p3, "Failed to create target directory."
|
|
|
|
invoke-direct {p2, p0, p1, p3}, Lkotlin/io/FileSystemException;-><init>(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
.line 233
|
|
:cond_4
|
|
invoke-virtual {p1}, Ljava/io/File;->getParentFile()Ljava/io/File;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
invoke-virtual {p2}, Ljava/io/File;->mkdirs()Z
|
|
|
|
:cond_5
|
|
new-instance p2, Ljava/io/FileInputStream;
|
|
|
|
.line 235
|
|
invoke-direct {p2, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
:try_start_0
|
|
new-instance p0, Ljava/io/FileOutputStream;
|
|
|
|
.line 236
|
|
invoke-direct {p0, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 237
|
|
:try_start_1
|
|
invoke-static {p2, p0, p3}, Lkotlin/io/ByteStreamsKt;->copyTo(Ljava/io/InputStream;Ljava/io/OutputStream;I)J
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
.line 236
|
|
:try_start_2
|
|
invoke-static {p0, p3}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
.line 235
|
|
invoke-static {p2, p3}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
|
|
|
:goto_1
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
.line 236
|
|
:try_start_3
|
|
throw p1
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_2
|
|
|
|
:catchall_2
|
|
move-exception p3
|
|
|
|
:try_start_4
|
|
invoke-static {p0, p1}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
|
|
|
throw p3
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
.line 235
|
|
:goto_2
|
|
:try_start_5
|
|
throw p0
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_3
|
|
|
|
:catchall_3
|
|
move-exception p1
|
|
|
|
invoke-static {p2, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
|
|
|
throw p1
|
|
|
|
.line 219
|
|
:cond_6
|
|
new-instance p1, Lkotlin/io/NoSuchFileException;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const-string v3, "The source file doesn\'t exist."
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p1
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v0 .. v5}, Lkotlin/io/NoSuchFileException;-><init>(Ljava/io/File;Ljava/io/File;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static synthetic copyTo$default(Ljava/io/File;Ljava/io/File;ZIILjava/lang/Object;)Ljava/io/File;
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
const/16 p3, 0x2000
|
|
|
|
.line 217
|
|
:cond_1
|
|
invoke-static {p0, p1, p2, p3}, Lkotlin/io/FilesKt__UtilsKt;->copyTo(Ljava/io/File;Ljava/io/File;ZI)Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static deleteRecursively(Ljava/io/File;)Z
|
|
.locals 4
|
|
|
|
const-string v0, "<this>"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 347
|
|
invoke-static {p0}, Lkotlin/io/FilesKt__FileTreeWalkKt;->walkBottomUp(Ljava/io/File;)Lkotlin/io/FileTreeWalk;
|
|
|
|
move-result-object p0
|
|
|
|
.line 1285
|
|
invoke-interface {p0}, Lkotlin/sequences/Sequence;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:goto_0
|
|
move v1, v0
|
|
|
|
:goto_1
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/io/File;
|
|
|
|
.line 347
|
|
invoke-virtual {v2}, Ljava/io/File;->delete()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
invoke-virtual {v2}, Ljava/io/File;->exists()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
:cond_0
|
|
if-eqz v1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method public static getExtension(Ljava/io/File;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-string v0, "<this>"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 92
|
|
invoke-virtual {p0}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "getName(...)"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/16 v0, 0x2e
|
|
|
|
const-string v1, ""
|
|
|
|
invoke-static {p0, v0, v1}, Lkotlin/text/StringsKt;->substringAfterLast(Ljava/lang/String;CLjava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final resolve(Ljava/io/File;Ljava/io/File;)Ljava/io/File;
|
|
.locals 4
|
|
|
|
const-string v0, "<this>"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "relative"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 437
|
|
invoke-static {p1}, Lkotlin/io/FilesKt__FilePathComponentsKt;->isRooted(Ljava/io/File;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object p1
|
|
|
|
.line 439
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/io/File;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "toString(...)"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 440
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sget-char v0, Ljava/io/File;->separatorChar:C
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {p0, v0, v3, v1, v2}, Lkotlin/text/StringsKt;->endsWith$default(Ljava/lang/CharSequence;CZILjava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
:goto_0
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v1, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
move-object v0, v1
|
|
|
|
:goto_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static resolve(Ljava/io/File;Ljava/lang/String;)Ljava/io/File;
|
|
.locals 1
|
|
|
|
const-string v0, "<this>"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "relative"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 450
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
invoke-direct {v0, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-static {p0, v0}, Lkotlin/io/FilesKt__UtilsKt;->resolve(Ljava/io/File;Ljava/io/File;)Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|