Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
20
apk_decompiled/sources/kotlin/io/AccessDeniedException.java
Normal file
20
apk_decompiled/sources/kotlin/io/AccessDeniedException.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.File;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\u0002\u0010\u0007¨\u0006\b"}, d2 = {"Lkotlin/io/AccessDeniedException;", "Lkotlin/io/FileSystemException;", "file", "Ljava/io/File;", "other", "reason", "", "(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class AccessDeniedException extends FileSystemException {
|
||||
public /* synthetic */ AccessDeniedException(File file, File file2, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(file, (i & 2) != 0 ? null : file2, (i & 4) != 0 ? null : str);
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public AccessDeniedException(File file, File file2, String str) {
|
||||
super(file, file2, str);
|
||||
Intrinsics.checkNotNullParameter(file, "file");
|
||||
}
|
||||
}
|
||||
262
apk_decompiled/sources/kotlin/io/ByteStreamsKt.java
Normal file
262
apk_decompiled/sources/kotlin/io/ByteStreamsKt.java
Normal file
@@ -0,0 +1,262 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.NoSuchElementException;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecatedSinceKotlin;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.collections.ByteIterator;
|
||||
import kotlin.internal.InlineOnly;
|
||||
import kotlin.jvm.JvmName;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.text.Charsets;
|
||||
|
||||
@Metadata(d1 = {"\u0000Z\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u0012\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u001a\u0017\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\b\u001a\u0017\u0010\u0000\u001a\u00020\u0005*\u00020\u00062\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\b\u001a\u0017\u0010\u0007\u001a\u00020\b*\u00020\u00022\b\b\u0002\u0010\t\u001a\u00020\nH\u0087\b\u001a\u0017\u0010\u000b\u001a\u00020\f*\u00020\u00062\b\b\u0002\u0010\t\u001a\u00020\nH\u0087\b\u001a\u0017\u0010\r\u001a\u00020\u000e*\u00020\u000f2\b\b\u0002\u0010\t\u001a\u00020\nH\u0087\b\u001a\u001c\u0010\u0010\u001a\u00020\u0011*\u00020\u00022\u0006\u0010\u0012\u001a\u00020\u00062\b\b\u0002\u0010\u0003\u001a\u00020\u0004\u001a\r\u0010\u0013\u001a\u00020\u000e*\u00020\u0014H\u0087\b\u001a\u001d\u0010\u0013\u001a\u00020\u000e*\u00020\u00142\u0006\u0010\u0015\u001a\u00020\u00042\u0006\u0010\u0016\u001a\u00020\u0004H\u0087\b\u001a\r\u0010\u0017\u001a\u00020\u0018*\u00020\u0001H\u0086\u0002\u001a\f\u0010\u0019\u001a\u00020\u0014*\u00020\u0002H\u0007\u001a\u0016\u0010\u0019\u001a\u00020\u0014*\u00020\u00022\b\b\u0002\u0010\u001a\u001a\u00020\u0004H\u0007\u001a\u0017\u0010\u001b\u001a\u00020\u001c*\u00020\u00022\b\b\u0002\u0010\t\u001a\u00020\nH\u0087\b\u001a\u0017\u0010\u001d\u001a\u00020\u001e*\u00020\u00062\b\b\u0002\u0010\t\u001a\u00020\nH\u0087\b¨\u0006\u001f"}, d2 = {"buffered", "Ljava/io/BufferedInputStream;", "Ljava/io/InputStream;", "bufferSize", "", "Ljava/io/BufferedOutputStream;", "Ljava/io/OutputStream;", "bufferedReader", "Ljava/io/BufferedReader;", "charset", "Ljava/nio/charset/Charset;", "bufferedWriter", "Ljava/io/BufferedWriter;", "byteInputStream", "Ljava/io/ByteArrayInputStream;", "", "copyTo", "", "out", "inputStream", "", "offset", "length", "iterator", "Lkotlin/collections/ByteIterator;", "readBytes", "estimatedSize", "reader", "Ljava/io/InputStreamReader;", "writer", "Ljava/io/OutputStreamWriter;", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
@JvmName(name = "ByteStreamsKt")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ByteStreamsKt {
|
||||
@InlineOnly
|
||||
private static final BufferedInputStream buffered(InputStream inputStream, int i) {
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
return inputStream instanceof BufferedInputStream ? (BufferedInputStream) inputStream : new BufferedInputStream(inputStream, i);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BufferedInputStream buffered$default(InputStream inputStream, int i, int i4, Object obj) {
|
||||
if ((i4 & 1) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
return inputStream instanceof BufferedInputStream ? (BufferedInputStream) inputStream : new BufferedInputStream(inputStream, i);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final BufferedReader bufferedReader(InputStream inputStream, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new BufferedReader(new InputStreamReader(inputStream, charset), 8192);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BufferedReader bufferedReader$default(InputStream inputStream, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new BufferedReader(new InputStreamReader(inputStream, charset), 8192);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final BufferedWriter bufferedWriter(OutputStream outputStream, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(outputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new BufferedWriter(new OutputStreamWriter(outputStream, charset), 8192);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BufferedWriter bufferedWriter$default(OutputStream outputStream, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(outputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new BufferedWriter(new OutputStreamWriter(outputStream, charset), 8192);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final ByteArrayInputStream byteInputStream(String str, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(str, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
byte[] bytes = str.getBytes(charset);
|
||||
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
||||
return new ByteArrayInputStream(bytes);
|
||||
}
|
||||
|
||||
public static /* synthetic */ ByteArrayInputStream byteInputStream$default(String str, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(str, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
byte[] bytes = str.getBytes(charset);
|
||||
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
||||
return new ByteArrayInputStream(bytes);
|
||||
}
|
||||
|
||||
public static final long copyTo(InputStream inputStream, OutputStream out, int i) {
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(out, "out");
|
||||
byte[] bArr = new byte[i];
|
||||
int read = inputStream.read(bArr);
|
||||
long j4 = 0;
|
||||
while (read >= 0) {
|
||||
out.write(bArr, 0, read);
|
||||
j4 += read;
|
||||
read = inputStream.read(bArr);
|
||||
}
|
||||
return j4;
|
||||
}
|
||||
|
||||
public static /* synthetic */ long copyTo$default(InputStream inputStream, OutputStream outputStream, int i, int i4, Object obj) {
|
||||
if ((i4 & 2) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
return copyTo(inputStream, outputStream, i);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final ByteArrayInputStream inputStream(byte[] bArr) {
|
||||
Intrinsics.checkNotNullParameter(bArr, "<this>");
|
||||
return new ByteArrayInputStream(bArr);
|
||||
}
|
||||
|
||||
public static final ByteIterator iterator(final BufferedInputStream bufferedInputStream) {
|
||||
Intrinsics.checkNotNullParameter(bufferedInputStream, "<this>");
|
||||
return new ByteIterator() { // from class: kotlin.io.ByteStreamsKt$iterator$1
|
||||
private boolean finished;
|
||||
private int nextByte = -1;
|
||||
private boolean nextPrepared;
|
||||
|
||||
private final void prepareNext() {
|
||||
if (this.nextPrepared || this.finished) {
|
||||
return;
|
||||
}
|
||||
int read = bufferedInputStream.read();
|
||||
this.nextByte = read;
|
||||
this.nextPrepared = true;
|
||||
this.finished = read == -1;
|
||||
}
|
||||
|
||||
public final boolean getFinished() {
|
||||
return this.finished;
|
||||
}
|
||||
|
||||
public final int getNextByte() {
|
||||
return this.nextByte;
|
||||
}
|
||||
|
||||
public final boolean getNextPrepared() {
|
||||
return this.nextPrepared;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
prepareNext();
|
||||
return !this.finished;
|
||||
}
|
||||
|
||||
@Override // kotlin.collections.ByteIterator
|
||||
public byte nextByte() {
|
||||
prepareNext();
|
||||
if (this.finished) {
|
||||
throw new NoSuchElementException("Input stream is over.");
|
||||
}
|
||||
byte b4 = (byte) this.nextByte;
|
||||
this.nextPrepared = false;
|
||||
return b4;
|
||||
}
|
||||
|
||||
public final void setFinished(boolean z3) {
|
||||
this.finished = z3;
|
||||
}
|
||||
|
||||
public final void setNextByte(int i) {
|
||||
this.nextByte = i;
|
||||
}
|
||||
|
||||
public final void setNextPrepared(boolean z3) {
|
||||
this.nextPrepared = z3;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Deprecated(message = "Use readBytes() overload without estimatedSize parameter", replaceWith = @ReplaceWith(expression = "readBytes()", imports = {}))
|
||||
@DeprecatedSinceKotlin(errorSince = "1.5", warningSince = "1.3")
|
||||
public static final byte[] readBytes(InputStream inputStream, int i) {
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(Math.max(i, inputStream.available()));
|
||||
copyTo$default(inputStream, byteArrayOutputStream, 0, 2, null);
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
Intrinsics.checkNotNullExpressionValue(byteArray, "toByteArray(...)");
|
||||
return byteArray;
|
||||
}
|
||||
|
||||
public static /* synthetic */ byte[] readBytes$default(InputStream inputStream, int i, int i4, Object obj) {
|
||||
if ((i4 & 1) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
return readBytes(inputStream, i);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final InputStreamReader reader(InputStream inputStream, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new InputStreamReader(inputStream, charset);
|
||||
}
|
||||
|
||||
public static /* synthetic */ InputStreamReader reader$default(InputStream inputStream, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new InputStreamReader(inputStream, charset);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final OutputStreamWriter writer(OutputStream outputStream, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(outputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new OutputStreamWriter(outputStream, charset);
|
||||
}
|
||||
|
||||
public static /* synthetic */ OutputStreamWriter writer$default(OutputStream outputStream, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(outputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new OutputStreamWriter(outputStream, charset);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final BufferedOutputStream buffered(OutputStream outputStream, int i) {
|
||||
Intrinsics.checkNotNullParameter(outputStream, "<this>");
|
||||
return outputStream instanceof BufferedOutputStream ? (BufferedOutputStream) outputStream : new BufferedOutputStream(outputStream, i);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final ByteArrayInputStream inputStream(byte[] bArr, int i, int i4) {
|
||||
Intrinsics.checkNotNullParameter(bArr, "<this>");
|
||||
return new ByteArrayInputStream(bArr, i, i4);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BufferedOutputStream buffered$default(OutputStream outputStream, int i, int i4, Object obj) {
|
||||
if ((i4 & 1) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(outputStream, "<this>");
|
||||
return outputStream instanceof BufferedOutputStream ? (BufferedOutputStream) outputStream : new BufferedOutputStream(outputStream, i);
|
||||
}
|
||||
|
||||
@SinceKotlin(version = "1.3")
|
||||
public static final byte[] readBytes(InputStream inputStream) {
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(Math.max(8192, inputStream.available()));
|
||||
copyTo$default(inputStream, byteArrayOutputStream, 0, 2, null);
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
Intrinsics.checkNotNullExpressionValue(byteArray, "toByteArray(...)");
|
||||
return byteArray;
|
||||
}
|
||||
}
|
||||
65
apk_decompiled/sources/kotlin/io/CloseableKt.java
Normal file
65
apk_decompiled/sources/kotlin/io/CloseableKt.java
Normal file
@@ -0,0 +1,65 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.Closeable;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.PublishedApi;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.internal.InlineOnly;
|
||||
import kotlin.internal.PlatformImplementationsKt;
|
||||
import kotlin.jvm.JvmName;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.InlineMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001c\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a\u0018\u0010\u0000\u001a\u00020\u0001*\u0004\u0018\u00010\u00022\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004H\u0001\u001aH\u0010\u0005\u001a\u0002H\u0006\"\n\b\u0000\u0010\u0007*\u0004\u0018\u00010\u0002\"\u0004\b\u0001\u0010\u0006*\u0002H\u00072\u0012\u0010\b\u001a\u000e\u0012\u0004\u0012\u0002H\u0007\u0012\u0004\u0012\u0002H\u00060\tH\u0087\bø\u0001\u0000\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001¢\u0006\u0002\u0010\n\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006\u000b"}, d2 = {"closeFinally", "", "Ljava/io/Closeable;", "cause", "", "use", "R", "T", "block", "Lkotlin/Function1;", "(Ljava/io/Closeable;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
@JvmName(name = "CloseableKt")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class CloseableKt {
|
||||
@SinceKotlin(version = "1.1")
|
||||
@PublishedApi
|
||||
public static final void closeFinally(Closeable closeable, Throwable th) {
|
||||
if (closeable != null) {
|
||||
if (th == null) {
|
||||
closeable.close();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
closeable.close();
|
||||
} catch (Throwable th2) {
|
||||
kotlin.ExceptionsKt.addSuppressed(th, th2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final <T extends Closeable, R> R use(T t2, Function1<? super T, ? extends R> block) {
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
try {
|
||||
R invoke = block.invoke(t2);
|
||||
InlineMarker.finallyStart(1);
|
||||
if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) {
|
||||
closeFinally(t2, null);
|
||||
} else if (t2 != null) {
|
||||
t2.close();
|
||||
}
|
||||
InlineMarker.finallyEnd(1);
|
||||
return invoke;
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
throw th;
|
||||
} catch (Throwable th2) {
|
||||
InlineMarker.finallyStart(1);
|
||||
if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) {
|
||||
closeFinally(t2, th);
|
||||
} else if (t2 != null) {
|
||||
try {
|
||||
t2.close();
|
||||
} catch (Throwable unused) {
|
||||
}
|
||||
}
|
||||
InlineMarker.finallyEnd(1);
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
144
apk_decompiled/sources/kotlin/io/ConsoleKt.java
Normal file
144
apk_decompiled/sources/kotlin/io/ConsoleKt.java
Normal file
@@ -0,0 +1,144 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.internal.InlineOnly;
|
||||
import kotlin.jvm.JvmName;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000<\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\u0010\u000b\n\u0002\u0010\u0005\n\u0002\u0010\f\n\u0002\u0010\u0019\n\u0002\u0010\u0006\n\u0002\u0010\u0007\n\u0002\u0010\b\n\u0002\u0010\t\n\u0002\u0010\n\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\u001a\u0013\u0010\u0000\u001a\u00020\u00012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003H\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0004H\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0005H\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0006H\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0007H\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\bH\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\tH\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\nH\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u000bH\u0087\b\u001a\u0011\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\fH\u0087\b\u001a\t\u0010\r\u001a\u00020\u0001H\u0087\b\u001a\u0013\u0010\r\u001a\u00020\u00012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003H\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0004H\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0005H\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0006H\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0007H\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\bH\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\tH\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\nH\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u000bH\u0087\b\u001a\u0011\u0010\r\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\fH\u0087\b\u001a\b\u0010\u000e\u001a\u0004\u0018\u00010\u000f\u001a\b\u0010\u0010\u001a\u00020\u000fH\u0007\u001a\n\u0010\u0011\u001a\u0004\u0018\u00010\u000fH\u0007¨\u0006\u0012"}, d2 = {"print", "", "message", "", "", "", "", "", "", "", "", "", "", "println", "readLine", "", "readln", "readlnOrNull", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
@JvmName(name = "ConsoleKt")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConsoleKt {
|
||||
@InlineOnly
|
||||
private static final void print(Object obj) {
|
||||
System.out.print(obj);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(Object obj) {
|
||||
System.out.println(obj);
|
||||
}
|
||||
|
||||
public static final String readLine() {
|
||||
LineReader lineReader = LineReader.INSTANCE;
|
||||
InputStream in = System.in;
|
||||
Intrinsics.checkNotNullExpressionValue(in, "in");
|
||||
Charset defaultCharset = Charset.defaultCharset();
|
||||
Intrinsics.checkNotNullExpressionValue(defaultCharset, "defaultCharset(...)");
|
||||
return lineReader.readLine(in, defaultCharset);
|
||||
}
|
||||
|
||||
@SinceKotlin(version = "1.6")
|
||||
public static final String readln() {
|
||||
String readlnOrNull = readlnOrNull();
|
||||
if (readlnOrNull != null) {
|
||||
return readlnOrNull;
|
||||
}
|
||||
throw new ReadAfterEOFException("EOF has already been reached");
|
||||
}
|
||||
|
||||
@SinceKotlin(version = "1.6")
|
||||
public static final String readlnOrNull() {
|
||||
return readLine();
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(int i) {
|
||||
System.out.print(i);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(int i) {
|
||||
System.out.println(i);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(long j4) {
|
||||
System.out.print(j4);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(long j4) {
|
||||
System.out.println(j4);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(byte b4) {
|
||||
System.out.print(Byte.valueOf(b4));
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(byte b4) {
|
||||
System.out.println(Byte.valueOf(b4));
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(short s4) {
|
||||
System.out.print(Short.valueOf(s4));
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(short s4) {
|
||||
System.out.println(Short.valueOf(s4));
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(char c4) {
|
||||
System.out.print(c4);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(char c4) {
|
||||
System.out.println(c4);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(boolean z3) {
|
||||
System.out.print(z3);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(boolean z3) {
|
||||
System.out.println(z3);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(float f2) {
|
||||
System.out.print(f2);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(float f2) {
|
||||
System.out.println(f2);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(double d4) {
|
||||
System.out.print(d4);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(double d4) {
|
||||
System.out.println(d4);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void print(char[] message) {
|
||||
Intrinsics.checkNotNullParameter(message, "message");
|
||||
System.out.print(message);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println(char[] message) {
|
||||
Intrinsics.checkNotNullParameter(message, "message");
|
||||
System.out.println(message);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final void println() {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
13
apk_decompiled/sources/kotlin/io/ConstantsKt.java
Normal file
13
apk_decompiled/sources/kotlin/io/ConstantsKt.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package kotlin.io;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.JvmName;
|
||||
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0001X\u0086T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0003\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000¨\u0006\u0004"}, d2 = {"DEFAULT_BLOCK_SIZE", "", "DEFAULT_BUFFER_SIZE", "MINIMUM_BLOCK_SIZE", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
@JvmName(name = "ConstantsKt")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConstantsKt {
|
||||
public static final int DEFAULT_BLOCK_SIZE = 4096;
|
||||
public static final int DEFAULT_BUFFER_SIZE = 8192;
|
||||
public static final int MINIMUM_BLOCK_SIZE = 512;
|
||||
}
|
||||
23
apk_decompiled/sources/kotlin/io/ExceptionsKt.java
Normal file
23
apk_decompiled/sources/kotlin/io/ExceptionsKt.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.File;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u001a$\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\b\u0010\u0004\u001a\u0004\u0018\u00010\u00032\b\u0010\u0005\u001a\u0004\u0018\u00010\u0001H\u0002¨\u0006\u0006"}, d2 = {"constructMessage", "", "file", "Ljava/io/File;", "other", "reason", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ExceptionsKt {
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final String constructMessage(File file, File file2, String str) {
|
||||
StringBuilder sb = new StringBuilder(file.toString());
|
||||
if (file2 != null) {
|
||||
sb.append(" -> " + file2);
|
||||
}
|
||||
if (str != null) {
|
||||
sb.append(": ".concat(str));
|
||||
}
|
||||
String sb2 = sb.toString();
|
||||
Intrinsics.checkNotNullExpressionValue(sb2, "toString(...)");
|
||||
return sb2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0012\n\u0002\b\u0003\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004R\u0011\u0010\u0005\u001a\u00020\u00068F¢\u0006\u0006\u001a\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lkotlin/io/ExposingBufferByteArrayOutputStream;", "Ljava/io/ByteArrayOutputStream;", "size", "", "(I)V", "buffer", "", "getBuffer", "()[B", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
final class ExposingBufferByteArrayOutputStream extends ByteArrayOutputStream {
|
||||
public ExposingBufferByteArrayOutputStream(int i) {
|
||||
super(i);
|
||||
}
|
||||
|
||||
public final byte[] getBuffer() {
|
||||
byte[] buf = ((ByteArrayOutputStream) this).buf;
|
||||
Intrinsics.checkNotNullExpressionValue(buf, "buf");
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.File;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\u0002\u0010\u0007¨\u0006\b"}, d2 = {"Lkotlin/io/FileAlreadyExistsException;", "Lkotlin/io/FileSystemException;", "file", "Ljava/io/File;", "other", "reason", "", "(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FileAlreadyExistsException extends FileSystemException {
|
||||
public /* synthetic */ FileAlreadyExistsException(File file, File file2, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(file, (i & 2) != 0 ? null : file2, (i & 4) != 0 ? null : str);
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public FileAlreadyExistsException(File file, File file2, String str) {
|
||||
super(file, file2, str);
|
||||
Intrinsics.checkNotNullParameter(file, "file");
|
||||
}
|
||||
}
|
||||
107
apk_decompiled/sources/kotlin/io/FilePathComponents.java
Normal file
107
apk_decompiled/sources/kotlin/io/FilePathComponents.java
Normal file
@@ -0,0 +1,107 @@
|
||||
package kotlin.io;
|
||||
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.CollectionsKt___CollectionsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\r\b\u0080\b\u0018\u00002\u00020\u0001B\u001d\b\u0000\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0005¢\u0006\u0002\u0010\u0006J\t\u0010\u0016\u001a\u00020\u0003HÆ\u0003J\u000f\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u00030\u0005HÆ\u0003J#\u0010\u0018\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\u000e\b\u0002\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0005HÆ\u0001J\u0013\u0010\u0019\u001a\u00020\b2\b\u0010\u001a\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u001b\u001a\u00020\u0013HÖ\u0001J\u0016\u0010\u001c\u001a\u00020\u00032\u0006\u0010\u001d\u001a\u00020\u00132\u0006\u0010\u001e\u001a\u00020\u0013J\t\u0010\u001f\u001a\u00020\rHÖ\u0001R\u0011\u0010\u0007\u001a\u00020\b8F¢\u0006\u0006\u001a\u0004\b\u0007\u0010\tR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u0011\u0010\f\u001a\u00020\r8F¢\u0006\u0006\u001a\u0004\b\u000e\u0010\u000fR\u0017\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0011\u0010\u0012\u001a\u00020\u00138F¢\u0006\u0006\u001a\u0004\b\u0014\u0010\u0015¨\u0006 "}, d2 = {"Lkotlin/io/FilePathComponents;", "", "root", "Ljava/io/File;", "segments", "", "(Ljava/io/File;Ljava/util/List;)V", "isRooted", "", "()Z", "getRoot", "()Ljava/io/File;", "rootName", "", "getRootName", "()Ljava/lang/String;", "getSegments", "()Ljava/util/List;", "size", "", "getSize", "()I", "component1", "component2", "copy", "equals", "other", "hashCode", "subPath", "beginIndex", "endIndex", "toString", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* data */ class FilePathComponents {
|
||||
private final File root;
|
||||
private final List<File> segments;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public FilePathComponents(File root, List<? extends File> segments) {
|
||||
Intrinsics.checkNotNullParameter(root, "root");
|
||||
Intrinsics.checkNotNullParameter(segments, "segments");
|
||||
this.root = root;
|
||||
this.segments = segments;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public static /* synthetic */ FilePathComponents copy$default(FilePathComponents filePathComponents, File file, List list, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
file = filePathComponents.root;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
list = filePathComponents.segments;
|
||||
}
|
||||
return filePathComponents.copy(file, list);
|
||||
}
|
||||
|
||||
/* renamed from: component1, reason: from getter */
|
||||
public final File getRoot() {
|
||||
return this.root;
|
||||
}
|
||||
|
||||
public final List<File> component2() {
|
||||
return this.segments;
|
||||
}
|
||||
|
||||
public final FilePathComponents copy(File root, List<? extends File> segments) {
|
||||
Intrinsics.checkNotNullParameter(root, "root");
|
||||
Intrinsics.checkNotNullParameter(segments, "segments");
|
||||
return new FilePathComponents(root, segments);
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof FilePathComponents)) {
|
||||
return false;
|
||||
}
|
||||
FilePathComponents filePathComponents = (FilePathComponents) other;
|
||||
return Intrinsics.areEqual(this.root, filePathComponents.root) && Intrinsics.areEqual(this.segments, filePathComponents.segments);
|
||||
}
|
||||
|
||||
public final File getRoot() {
|
||||
return this.root;
|
||||
}
|
||||
|
||||
public final String getRootName() {
|
||||
String path = this.root.getPath();
|
||||
Intrinsics.checkNotNullExpressionValue(path, "getPath(...)");
|
||||
return path;
|
||||
}
|
||||
|
||||
public final List<File> getSegments() {
|
||||
return this.segments;
|
||||
}
|
||||
|
||||
public final int getSize() {
|
||||
return this.segments.size();
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.segments.hashCode() + (this.root.hashCode() * 31);
|
||||
}
|
||||
|
||||
public final boolean isRooted() {
|
||||
String path = this.root.getPath();
|
||||
Intrinsics.checkNotNullExpressionValue(path, "getPath(...)");
|
||||
return path.length() > 0;
|
||||
}
|
||||
|
||||
public final File subPath(int beginIndex, int endIndex) {
|
||||
String joinToString$default;
|
||||
if (beginIndex < 0 || beginIndex > endIndex || endIndex > getSize()) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
List<File> subList = this.segments.subList(beginIndex, endIndex);
|
||||
String separator = File.separator;
|
||||
Intrinsics.checkNotNullExpressionValue(separator, "separator");
|
||||
joinToString$default = CollectionsKt___CollectionsKt.joinToString$default(subList, separator, null, null, 0, null, null, 62, null);
|
||||
return new File(joinToString$default);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("FilePathComponents(root=");
|
||||
sb.append(this.root);
|
||||
sb.append(", segments=");
|
||||
return a.o(sb, this.segments, ')');
|
||||
}
|
||||
}
|
||||
50
apk_decompiled/sources/kotlin/io/FileSystemException.java
Normal file
50
apk_decompiled/sources/kotlin/io/FileSystemException.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0007\b\u0016\u0018\u00002\u00020\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\u0002\u0010\u0007R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\tR\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\tR\u0013\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\f¨\u0006\r"}, d2 = {"Lkotlin/io/FileSystemException;", "Ljava/io/IOException;", "file", "Ljava/io/File;", "other", "reason", "", "(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V", "getFile", "()Ljava/io/File;", "getOther", "getReason", "()Ljava/lang/String;", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public class FileSystemException extends IOException {
|
||||
private final File file;
|
||||
private final File other;
|
||||
private final String reason;
|
||||
|
||||
public /* synthetic */ FileSystemException(File file, File file2, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(file, (i & 2) != 0 ? null : file2, (i & 4) != 0 ? null : str);
|
||||
}
|
||||
|
||||
public final File getFile() {
|
||||
return this.file;
|
||||
}
|
||||
|
||||
public final File getOther() {
|
||||
return this.other;
|
||||
}
|
||||
|
||||
public final String getReason() {
|
||||
return this.reason;
|
||||
}
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public FileSystemException(java.io.File r2, java.io.File r3, java.lang.String r4) {
|
||||
/*
|
||||
r1 = this;
|
||||
java.lang.String r0 = "file"
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r2, r0)
|
||||
java.lang.String r0 = kotlin.io.ExceptionsKt.access$constructMessage(r2, r3, r4)
|
||||
r1.<init>(r0)
|
||||
r1.file = r2
|
||||
r1.other = r3
|
||||
r1.reason = r4
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.io.FileSystemException.<init>(java.io.File, java.io.File, java.lang.String):void");
|
||||
}
|
||||
}
|
||||
378
apk_decompiled/sources/kotlin/io/FileTreeWalk.java
Normal file
378
apk_decompiled/sources/kotlin/io/FileTreeWalk.java
Normal file
@@ -0,0 +1,378 @@
|
||||
package kotlin.io;
|
||||
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import com.google.firebase.remoteconfig.RemoteConfigConstants;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Iterator;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.NoWhenBranchMatchedException;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.AbstractIterator;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.sequences.Sequence;
|
||||
|
||||
@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010(\n\u0002\b\u0006\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0003\u001a\u001b\u001cB\u0019\b\u0010\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006B\u0089\u0001\b\u0002\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0005\u0012\u0014\u0010\u0007\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\t\u0018\u00010\b\u0012\u0014\u0010\n\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u000b\u0018\u00010\b\u00128\u0010\f\u001a4\u0012\u0013\u0012\u00110\u0002¢\u0006\f\b\u000e\u0012\b\b\u000f\u0012\u0004\b\b(\u0010\u0012\u0013\u0012\u00110\u0011¢\u0006\f\b\u000e\u0012\b\b\u000f\u0012\u0004\b\b(\u0012\u0012\u0004\u0012\u00020\u000b\u0018\u00010\r\u0012\b\b\u0002\u0010\u0013\u001a\u00020\u0014¢\u0006\u0002\u0010\u0015J\u000f\u0010\u0016\u001a\b\u0012\u0004\u0012\u00020\u00020\u0017H\u0096\u0002J\u000e\u0010\u0013\u001a\u00020\u00002\u0006\u0010\u0018\u001a\u00020\u0014J\u001a\u0010\u0007\u001a\u00020\u00002\u0012\u0010\u0019\u001a\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\t0\bJ \u0010\f\u001a\u00020\u00002\u0018\u0010\u0019\u001a\u0014\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0011\u0012\u0004\u0012\u00020\u000b0\rJ\u001a\u0010\n\u001a\u00020\u00002\u0012\u0010\u0019\u001a\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u000b0\bR\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0013\u001a\u00020\u0014X\u0082\u0004¢\u0006\u0002\n\u0000R\u001c\u0010\u0007\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\t\u0018\u00010\bX\u0082\u0004¢\u0006\u0002\n\u0000R@\u0010\f\u001a4\u0012\u0013\u0012\u00110\u0002¢\u0006\f\b\u000e\u0012\b\b\u000f\u0012\u0004\b\b(\u0010\u0012\u0013\u0012\u00110\u0011¢\u0006\f\b\u000e\u0012\b\b\u000f\u0012\u0004\b\b(\u0012\u0012\u0004\u0012\u00020\u000b\u0018\u00010\rX\u0082\u0004¢\u0006\u0002\n\u0000R\u001c\u0010\n\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u000b\u0018\u00010\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0003\u001a\u00020\u0002X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u001d"}, d2 = {"Lkotlin/io/FileTreeWalk;", "Lkotlin/sequences/Sequence;", "Ljava/io/File;", "start", "direction", "Lkotlin/io/FileWalkDirection;", "(Ljava/io/File;Lkotlin/io/FileWalkDirection;)V", "onEnter", "Lkotlin/Function1;", "", "onLeave", "", "onFail", "Lkotlin/Function2;", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "f", "Ljava/io/IOException;", "e", "maxDepth", "", "(Ljava/io/File;Lkotlin/io/FileWalkDirection;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;I)V", "iterator", "", "depth", "function", "DirectoryState", "FileTreeWalkIterator", "WalkState", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FileTreeWalk implements Sequence<File> {
|
||||
private final FileWalkDirection direction;
|
||||
private final int maxDepth;
|
||||
private final Function1<File, Boolean> onEnter;
|
||||
private final Function2<File, IOException, Unit> onFail;
|
||||
private final Function1<File, Unit> onLeave;
|
||||
private final File start;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\"\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004¨\u0006\u0005"}, d2 = {"Lkotlin/io/FileTreeWalk$DirectoryState;", "Lkotlin/io/FileTreeWalk$WalkState;", "rootDir", "Ljava/io/File;", "(Ljava/io/File;)V", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nFileTreeWalk.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FileTreeWalk.kt\nkotlin/io/FileTreeWalk$DirectoryState\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,273:1\n1#2:274\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class DirectoryState extends WalkState {
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public DirectoryState(File rootDir) {
|
||||
super(rootDir);
|
||||
Intrinsics.checkNotNullParameter(rootDir, "rootDir");
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0082\u0004\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0003\r\u000e\u000fB\u0005¢\u0006\u0002\u0010\u0003J\b\u0010\u0007\u001a\u00020\bH\u0014J\u0010\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\u0002H\u0002J\u000b\u0010\f\u001a\u0004\u0018\u00010\u0002H\u0082\u0010R\u0014\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0010"}, d2 = {"Lkotlin/io/FileTreeWalk$FileTreeWalkIterator;", "Lkotlin/collections/AbstractIterator;", "Ljava/io/File;", "(Lkotlin/io/FileTreeWalk;)V", RemoteConfigConstants.ResponseFieldKey.STATE, "Ljava/util/ArrayDeque;", "Lkotlin/io/FileTreeWalk$WalkState;", "computeNext", "", "directoryState", "Lkotlin/io/FileTreeWalk$DirectoryState;", "root", "gotoNext", "BottomUpDirectoryState", "SingleFileState", "TopDownDirectoryState", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FileTreeWalkIterator extends AbstractIterator<File> {
|
||||
private final ArrayDeque<WalkState> state;
|
||||
|
||||
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0004\b\u0082\u0004\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\n\u0010\r\u001a\u0004\u0018\u00010\u0003H\u0016R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0018\u0010\t\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\nX\u0082\u000e¢\u0006\u0004\n\u0002\u0010\u000bR\u000e\u0010\f\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lkotlin/io/FileTreeWalk$FileTreeWalkIterator$BottomUpDirectoryState;", "Lkotlin/io/FileTreeWalk$DirectoryState;", "rootDir", "Ljava/io/File;", "(Lkotlin/io/FileTreeWalk$FileTreeWalkIterator;Ljava/io/File;)V", "failed", "", "fileIndex", "", "fileList", "", "[Ljava/io/File;", "rootVisited", "step", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BottomUpDirectoryState extends DirectoryState {
|
||||
private boolean failed;
|
||||
private int fileIndex;
|
||||
private File[] fileList;
|
||||
private boolean rootVisited;
|
||||
final /* synthetic */ FileTreeWalkIterator this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public BottomUpDirectoryState(FileTreeWalkIterator fileTreeWalkIterator, File rootDir) {
|
||||
super(rootDir);
|
||||
Intrinsics.checkNotNullParameter(rootDir, "rootDir");
|
||||
this.this$0 = fileTreeWalkIterator;
|
||||
}
|
||||
|
||||
@Override // kotlin.io.FileTreeWalk.WalkState
|
||||
public File step() {
|
||||
if (!this.failed && this.fileList == null) {
|
||||
Function1 function1 = FileTreeWalk.this.onEnter;
|
||||
if (function1 != null && !((Boolean) function1.invoke(getRoot())).booleanValue()) {
|
||||
return null;
|
||||
}
|
||||
File[] listFiles = getRoot().listFiles();
|
||||
this.fileList = listFiles;
|
||||
if (listFiles == null) {
|
||||
Function2 function2 = FileTreeWalk.this.onFail;
|
||||
if (function2 != null) {
|
||||
function2.invoke(getRoot(), new AccessDeniedException(getRoot(), null, "Cannot list files in a directory", 2, null));
|
||||
}
|
||||
this.failed = true;
|
||||
}
|
||||
}
|
||||
File[] fileArr = this.fileList;
|
||||
if (fileArr != null) {
|
||||
int i = this.fileIndex;
|
||||
Intrinsics.checkNotNull(fileArr);
|
||||
if (i < fileArr.length) {
|
||||
File[] fileArr2 = this.fileList;
|
||||
Intrinsics.checkNotNull(fileArr2);
|
||||
int i4 = this.fileIndex;
|
||||
this.fileIndex = i4 + 1;
|
||||
return fileArr2[i4];
|
||||
}
|
||||
}
|
||||
if (!this.rootVisited) {
|
||||
this.rootVisited = true;
|
||||
return getRoot();
|
||||
}
|
||||
Function1 function12 = FileTreeWalk.this.onLeave;
|
||||
if (function12 != null) {
|
||||
function12.invoke(getRoot());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\b\u0082\u0004\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\n\u0010\u0007\u001a\u0004\u0018\u00010\u0003H\u0016R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\b"}, d2 = {"Lkotlin/io/FileTreeWalk$FileTreeWalkIterator$SingleFileState;", "Lkotlin/io/FileTreeWalk$WalkState;", "rootFile", "Ljava/io/File;", "(Lkotlin/io/FileTreeWalk$FileTreeWalkIterator;Ljava/io/File;)V", "visited", "", "step", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nFileTreeWalk.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FileTreeWalk.kt\nkotlin/io/FileTreeWalk$FileTreeWalkIterator$SingleFileState\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,273:1\n1#2:274\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SingleFileState extends WalkState {
|
||||
final /* synthetic */ FileTreeWalkIterator this$0;
|
||||
private boolean visited;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public SingleFileState(FileTreeWalkIterator fileTreeWalkIterator, File rootFile) {
|
||||
super(rootFile);
|
||||
Intrinsics.checkNotNullParameter(rootFile, "rootFile");
|
||||
this.this$0 = fileTreeWalkIterator;
|
||||
}
|
||||
|
||||
@Override // kotlin.io.FileTreeWalk.WalkState
|
||||
public File step() {
|
||||
if (this.visited) {
|
||||
return null;
|
||||
}
|
||||
this.visited = true;
|
||||
return getRoot();
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\b\u0082\u0004\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\n\u0010\f\u001a\u0004\u0018\u00010\u0003H\u0016R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u0018\u0010\u0007\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\bX\u0082\u000e¢\u0006\u0004\n\u0002\u0010\tR\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Lkotlin/io/FileTreeWalk$FileTreeWalkIterator$TopDownDirectoryState;", "Lkotlin/io/FileTreeWalk$DirectoryState;", "rootDir", "Ljava/io/File;", "(Lkotlin/io/FileTreeWalk$FileTreeWalkIterator;Ljava/io/File;)V", "fileIndex", "", "fileList", "", "[Ljava/io/File;", "rootVisited", "", "step", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class TopDownDirectoryState extends DirectoryState {
|
||||
private int fileIndex;
|
||||
private File[] fileList;
|
||||
private boolean rootVisited;
|
||||
final /* synthetic */ FileTreeWalkIterator this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public TopDownDirectoryState(FileTreeWalkIterator fileTreeWalkIterator, File rootDir) {
|
||||
super(rootDir);
|
||||
Intrinsics.checkNotNullParameter(rootDir, "rootDir");
|
||||
this.this$0 = fileTreeWalkIterator;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:29:0x007e, code lost:
|
||||
|
||||
if (r0.length == 0) goto L31;
|
||||
*/
|
||||
@Override // kotlin.io.FileTreeWalk.WalkState
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public java.io.File step() {
|
||||
/*
|
||||
r9 = this;
|
||||
boolean r0 = r9.rootVisited
|
||||
r1 = 0
|
||||
if (r0 != 0) goto L28
|
||||
kotlin.io.FileTreeWalk$FileTreeWalkIterator r0 = r9.this$0
|
||||
kotlin.io.FileTreeWalk r0 = kotlin.io.FileTreeWalk.this
|
||||
kotlin.jvm.functions.Function1 r0 = kotlin.io.FileTreeWalk.access$getOnEnter$p(r0)
|
||||
if (r0 == 0) goto L20
|
||||
java.io.File r2 = r9.getRoot()
|
||||
java.lang.Object r0 = r0.invoke(r2)
|
||||
java.lang.Boolean r0 = (java.lang.Boolean) r0
|
||||
boolean r0 = r0.booleanValue()
|
||||
if (r0 != 0) goto L20
|
||||
return r1
|
||||
L20:
|
||||
r0 = 1
|
||||
r9.rootVisited = r0
|
||||
java.io.File r9 = r9.getRoot()
|
||||
return r9
|
||||
L28:
|
||||
java.io.File[] r0 = r9.fileList
|
||||
if (r0 == 0) goto L47
|
||||
int r2 = r9.fileIndex
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNull(r0)
|
||||
int r0 = r0.length
|
||||
if (r2 >= r0) goto L35
|
||||
goto L47
|
||||
L35:
|
||||
kotlin.io.FileTreeWalk$FileTreeWalkIterator r0 = r9.this$0
|
||||
kotlin.io.FileTreeWalk r0 = kotlin.io.FileTreeWalk.this
|
||||
kotlin.jvm.functions.Function1 r0 = kotlin.io.FileTreeWalk.access$getOnLeave$p(r0)
|
||||
if (r0 == 0) goto L46
|
||||
java.io.File r9 = r9.getRoot()
|
||||
r0.invoke(r9)
|
||||
L46:
|
||||
return r1
|
||||
L47:
|
||||
java.io.File[] r0 = r9.fileList
|
||||
if (r0 != 0) goto L92
|
||||
java.io.File r0 = r9.getRoot()
|
||||
java.io.File[] r0 = r0.listFiles()
|
||||
r9.fileList = r0
|
||||
if (r0 != 0) goto L76
|
||||
kotlin.io.FileTreeWalk$FileTreeWalkIterator r0 = r9.this$0
|
||||
kotlin.io.FileTreeWalk r0 = kotlin.io.FileTreeWalk.this
|
||||
kotlin.jvm.functions.Function2 r0 = kotlin.io.FileTreeWalk.access$getOnFail$p(r0)
|
||||
if (r0 == 0) goto L76
|
||||
java.io.File r2 = r9.getRoot()
|
||||
kotlin.io.AccessDeniedException r3 = new kotlin.io.AccessDeniedException
|
||||
java.io.File r4 = r9.getRoot()
|
||||
r7 = 2
|
||||
r8 = 0
|
||||
r5 = 0
|
||||
java.lang.String r6 = "Cannot list files in a directory"
|
||||
r3.<init>(r4, r5, r6, r7, r8)
|
||||
r0.invoke(r2, r3)
|
||||
L76:
|
||||
java.io.File[] r0 = r9.fileList
|
||||
if (r0 == 0) goto L80
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNull(r0)
|
||||
int r0 = r0.length
|
||||
if (r0 != 0) goto L92
|
||||
L80:
|
||||
kotlin.io.FileTreeWalk$FileTreeWalkIterator r0 = r9.this$0
|
||||
kotlin.io.FileTreeWalk r0 = kotlin.io.FileTreeWalk.this
|
||||
kotlin.jvm.functions.Function1 r0 = kotlin.io.FileTreeWalk.access$getOnLeave$p(r0)
|
||||
if (r0 == 0) goto L91
|
||||
java.io.File r9 = r9.getRoot()
|
||||
r0.invoke(r9)
|
||||
L91:
|
||||
return r1
|
||||
L92:
|
||||
java.io.File[] r0 = r9.fileList
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNull(r0)
|
||||
int r1 = r9.fileIndex
|
||||
int r2 = r1 + 1
|
||||
r9.fileIndex = r2
|
||||
r9 = r0[r1]
|
||||
return r9
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.io.FileTreeWalk.FileTreeWalkIterator.TopDownDirectoryState.step():java.io.File");
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[FileWalkDirection.values().length];
|
||||
try {
|
||||
iArr[FileWalkDirection.TOP_DOWN.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
iArr[FileWalkDirection.BOTTOM_UP.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
|
||||
public FileTreeWalkIterator() {
|
||||
ArrayDeque<WalkState> arrayDeque = new ArrayDeque<>();
|
||||
this.state = arrayDeque;
|
||||
if (FileTreeWalk.this.start.isDirectory()) {
|
||||
arrayDeque.push(directoryState(FileTreeWalk.this.start));
|
||||
} else if (FileTreeWalk.this.start.isFile()) {
|
||||
arrayDeque.push(new SingleFileState(this, FileTreeWalk.this.start));
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
}
|
||||
|
||||
private final DirectoryState directoryState(File root) {
|
||||
int i = WhenMappings.$EnumSwitchMapping$0[FileTreeWalk.this.direction.ordinal()];
|
||||
if (i == 1) {
|
||||
return new TopDownDirectoryState(this, root);
|
||||
}
|
||||
if (i == 2) {
|
||||
return new BottomUpDirectoryState(this, root);
|
||||
}
|
||||
throw new NoWhenBranchMatchedException();
|
||||
}
|
||||
|
||||
private final File gotoNext() {
|
||||
File step;
|
||||
while (true) {
|
||||
WalkState peek = this.state.peek();
|
||||
if (peek == null) {
|
||||
return null;
|
||||
}
|
||||
step = peek.step();
|
||||
if (step == null) {
|
||||
this.state.pop();
|
||||
} else {
|
||||
if (Intrinsics.areEqual(step, peek.getRoot()) || !step.isDirectory() || this.state.size() >= FileTreeWalk.this.maxDepth) {
|
||||
break;
|
||||
}
|
||||
this.state.push(directoryState(step));
|
||||
}
|
||||
}
|
||||
return step;
|
||||
}
|
||||
|
||||
@Override // kotlin.collections.AbstractIterator
|
||||
public void computeNext() {
|
||||
File gotoNext = gotoNext();
|
||||
if (gotoNext != null) {
|
||||
setNext(gotoNext);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b\"\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\n\u0010\u0007\u001a\u0004\u0018\u00010\u0003H&R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\b"}, d2 = {"Lkotlin/io/FileTreeWalk$WalkState;", "", "root", "Ljava/io/File;", "(Ljava/io/File;)V", "getRoot", "()Ljava/io/File;", "step", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class WalkState {
|
||||
private final File root;
|
||||
|
||||
public WalkState(File root) {
|
||||
Intrinsics.checkNotNullParameter(root, "root");
|
||||
this.root = root;
|
||||
}
|
||||
|
||||
public final File getRoot() {
|
||||
return this.root;
|
||||
}
|
||||
|
||||
public abstract File step();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private FileTreeWalk(File file, FileWalkDirection fileWalkDirection, Function1<? super File, Boolean> function1, Function1<? super File, Unit> function12, Function2<? super File, ? super IOException, Unit> function2, int i) {
|
||||
this.start = file;
|
||||
this.direction = fileWalkDirection;
|
||||
this.onEnter = function1;
|
||||
this.onLeave = function12;
|
||||
this.onFail = function2;
|
||||
this.maxDepth = i;
|
||||
}
|
||||
|
||||
@Override // kotlin.sequences.Sequence
|
||||
public Iterator<File> iterator() {
|
||||
return new FileTreeWalkIterator();
|
||||
}
|
||||
|
||||
public final FileTreeWalk maxDepth(int depth) {
|
||||
if (depth > 0) {
|
||||
return new FileTreeWalk(this.start, this.direction, this.onEnter, this.onLeave, this.onFail, depth);
|
||||
}
|
||||
throw new IllegalArgumentException("depth must be positive, but was " + depth + '.');
|
||||
}
|
||||
|
||||
public final FileTreeWalk onEnter(Function1<? super File, Boolean> function) {
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
return new FileTreeWalk(this.start, this.direction, function, this.onLeave, this.onFail, this.maxDepth);
|
||||
}
|
||||
|
||||
public final FileTreeWalk onFail(Function2<? super File, ? super IOException, Unit> function) {
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
return new FileTreeWalk(this.start, this.direction, this.onEnter, this.onLeave, function, this.maxDepth);
|
||||
}
|
||||
|
||||
public final FileTreeWalk onLeave(Function1<? super File, Unit> function) {
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
return new FileTreeWalk(this.start, this.direction, this.onEnter, function, this.onFail, this.maxDepth);
|
||||
}
|
||||
|
||||
public /* synthetic */ FileTreeWalk(File file, FileWalkDirection fileWalkDirection, Function1 function1, Function1 function12, Function2 function2, int i, int i4, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(file, (i4 & 2) != 0 ? FileWalkDirection.TOP_DOWN : fileWalkDirection, function1, function12, function2, (i4 & 32) != 0 ? Integer.MAX_VALUE : i);
|
||||
}
|
||||
|
||||
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
||||
public FileTreeWalk(File start, FileWalkDirection direction) {
|
||||
this(start, direction, null, null, null, 0, 32, null);
|
||||
Intrinsics.checkNotNullParameter(start, "start");
|
||||
Intrinsics.checkNotNullParameter(direction, "direction");
|
||||
}
|
||||
|
||||
public /* synthetic */ FileTreeWalk(File file, FileWalkDirection fileWalkDirection, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(file, (i & 2) != 0 ? FileWalkDirection.TOP_DOWN : fileWalkDirection);
|
||||
}
|
||||
}
|
||||
41
apk_decompiled/sources/kotlin/io/FileWalkDirection.java
Normal file
41
apk_decompiled/sources/kotlin/io/FileWalkDirection.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package kotlin.io;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0004\b\u0086\u0081\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004¨\u0006\u0005"}, d2 = {"Lkotlin/io/FileWalkDirection;", "", "(Ljava/lang/String;I)V", "TOP_DOWN", "BOTTOM_UP", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FileWalkDirection {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ FileWalkDirection[] $VALUES;
|
||||
public static final FileWalkDirection TOP_DOWN = new FileWalkDirection("TOP_DOWN", 0);
|
||||
public static final FileWalkDirection BOTTOM_UP = new FileWalkDirection("BOTTOM_UP", 1);
|
||||
|
||||
private static final /* synthetic */ FileWalkDirection[] $values() {
|
||||
return new FileWalkDirection[]{TOP_DOWN, BOTTOM_UP};
|
||||
}
|
||||
|
||||
static {
|
||||
FileWalkDirection[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private FileWalkDirection(String str, int i) {
|
||||
}
|
||||
|
||||
public static EnumEntries<FileWalkDirection> getEntries() {
|
||||
return $ENTRIES;
|
||||
}
|
||||
|
||||
public static FileWalkDirection valueOf(String str) {
|
||||
return (FileWalkDirection) Enum.valueOf(FileWalkDirection.class, str);
|
||||
}
|
||||
|
||||
public static FileWalkDirection[] values() {
|
||||
return (FileWalkDirection[]) $VALUES.clone();
|
||||
}
|
||||
}
|
||||
10
apk_decompiled/sources/kotlin/io/FilesKt.java
Normal file
10
apk_decompiled/sources/kotlin/io/FilesKt.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package kotlin.io;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"kotlin/io/FilesKt__FilePathComponentsKt", "kotlin/io/FilesKt__FileReadWriteKt", "kotlin/io/FilesKt__FileTreeWalkKt", "kotlin/io/FilesKt__UtilsKt"}, k = 4, mv = {1, 9, 0}, xi = 49)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FilesKt extends FilesKt__UtilsKt {
|
||||
private FilesKt() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt__IterablesKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.text.StringsKt__StringsKt;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
@Metadata(d1 = {"\u0000$\n\u0000\n\u0002\u0010\u000b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\u001a\u0011\u0010\u000b\u001a\u00020\f*\u00020\bH\u0002¢\u0006\u0002\b\r\u001a\u001c\u0010\u000e\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\u000f\u001a\u00020\f2\u0006\u0010\u0010\u001a\u00020\fH\u0000\u001a\f\u0010\u0011\u001a\u00020\u0012*\u00020\u0002H\u0000\"\u0015\u0010\u0000\u001a\u00020\u0001*\u00020\u00028F¢\u0006\u0006\u001a\u0004\b\u0000\u0010\u0003\"\u0018\u0010\u0004\u001a\u00020\u0002*\u00020\u00028@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b\u0005\u0010\u0006\"\u0018\u0010\u0007\u001a\u00020\b*\u00020\u00028@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b\t\u0010\n¨\u0006\u0013"}, d2 = {"isRooted", "", "Ljava/io/File;", "(Ljava/io/File;)Z", "root", "getRoot", "(Ljava/io/File;)Ljava/io/File;", "rootName", "", "getRootName", "(Ljava/io/File;)Ljava/lang/String;", "getRootLength", "", "getRootLength$FilesKt__FilePathComponentsKt", "subPath", "beginIndex", "endIndex", "toComponents", "Lkotlin/io/FilePathComponents;", "kotlin-stdlib"}, k = 5, mv = {1, 9, 0}, xi = 49, xs = "kotlin/io/FilesKt")
|
||||
@SourceDebugExtension({"SMAP\nFilePathComponents.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FilePathComponents.kt\nkotlin/io/FilesKt__FilePathComponentsKt\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,148:1\n1549#2:149\n1620#2,3:150\n*S KotlinDebug\n*F\n+ 1 FilePathComponents.kt\nkotlin/io/FilesKt__FilePathComponentsKt\n*L\n133#1:149\n133#1:150,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public class FilesKt__FilePathComponentsKt {
|
||||
public static final File getRoot(File file) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
return new File(getRootName(file));
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:7:0x0017, code lost:
|
||||
|
||||
r1 = kotlin.text.StringsKt__StringsKt.indexOf$default(r5, r0, 2, false, 4, (java.lang.Object) null);
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private static final int getRootLength$FilesKt__FilePathComponentsKt(java.lang.String r5) {
|
||||
/*
|
||||
char r0 = java.io.File.separatorChar
|
||||
r1 = 0
|
||||
r2 = 4
|
||||
int r3 = kotlin.text.StringsKt.l(r5, r0, r1, r2)
|
||||
r4 = 1
|
||||
if (r3 != 0) goto L2d
|
||||
int r1 = r5.length()
|
||||
if (r1 <= r4) goto L2c
|
||||
char r1 = r5.charAt(r4)
|
||||
if (r1 != r0) goto L2c
|
||||
r1 = 2
|
||||
int r1 = kotlin.text.StringsKt.l(r5, r0, r1, r2)
|
||||
if (r1 < 0) goto L2c
|
||||
int r1 = r1 + r4
|
||||
int r0 = kotlin.text.StringsKt.l(r5, r0, r1, r2)
|
||||
if (r0 < 0) goto L27
|
||||
int r0 = r0 + r4
|
||||
return r0
|
||||
L27:
|
||||
int r5 = r5.length()
|
||||
return r5
|
||||
L2c:
|
||||
return r4
|
||||
L2d:
|
||||
r0 = 58
|
||||
if (r3 <= 0) goto L3b
|
||||
int r2 = r3 + (-1)
|
||||
char r2 = r5.charAt(r2)
|
||||
if (r2 != r0) goto L3b
|
||||
int r3 = r3 + r4
|
||||
return r3
|
||||
L3b:
|
||||
r2 = -1
|
||||
if (r3 != r2) goto L49
|
||||
boolean r0 = kotlin.text.StringsKt.h(r0, r5)
|
||||
if (r0 == 0) goto L49
|
||||
int r5 = r5.length()
|
||||
return r5
|
||||
L49:
|
||||
return r1
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.io.FilesKt__FilePathComponentsKt.getRootLength$FilesKt__FilePathComponentsKt(java.lang.String):int");
|
||||
}
|
||||
|
||||
public static final String getRootName(File file) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
String path = file.getPath();
|
||||
Intrinsics.checkNotNullExpressionValue(path, "getPath(...)");
|
||||
String path2 = file.getPath();
|
||||
Intrinsics.checkNotNullExpressionValue(path2, "getPath(...)");
|
||||
String substring = path.substring(0, getRootLength$FilesKt__FilePathComponentsKt(path2));
|
||||
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
||||
return substring;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public static final File subPath(File file, int i, int i4) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
return toComponents(file).subPath(i, i4);
|
||||
}
|
||||
|
||||
public static final FilePathComponents toComponents(File file) {
|
||||
List split$default;
|
||||
int collectionSizeOrDefault;
|
||||
List list;
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
String path = file.getPath();
|
||||
Intrinsics.checkNotNull(path);
|
||||
int rootLength$FilesKt__FilePathComponentsKt = getRootLength$FilesKt__FilePathComponentsKt(path);
|
||||
String substring = path.substring(0, rootLength$FilesKt__FilePathComponentsKt);
|
||||
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
||||
String substring2 = path.substring(rootLength$FilesKt__FilePathComponentsKt);
|
||||
Intrinsics.checkNotNullExpressionValue(substring2, "substring(...)");
|
||||
if (substring2.length() == 0) {
|
||||
list = CollectionsKt.emptyList();
|
||||
} else {
|
||||
split$default = StringsKt__StringsKt.split$default((CharSequence) substring2, new char[]{File.separatorChar}, false, 0, 6, (Object) null);
|
||||
List list2 = split$default;
|
||||
collectionSizeOrDefault = CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10);
|
||||
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
|
||||
Iterator it = list2.iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(new File((String) it.next()));
|
||||
}
|
||||
list = arrayList;
|
||||
}
|
||||
return new FilePathComponents(new File(substring), list);
|
||||
}
|
||||
}
|
||||
408
apk_decompiled/sources/kotlin/io/FilesKt__FileReadWriteKt.java
Normal file
408
apk_decompiled/sources/kotlin/io/FilesKt__FileReadWriteKt.java
Normal file
@@ -0,0 +1,408 @@
|
||||
package kotlin.io;
|
||||
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.ArraysKt;
|
||||
import kotlin.internal.InlineOnly;
|
||||
import kotlin.internal.PlatformImplementationsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.InlineMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.ranges.RangesKt;
|
||||
import kotlin.sequences.Sequence;
|
||||
import kotlin.text.Charsets;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
@Metadata(d1 = {"\u0000z\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\u001a\u0012\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0004\u001a\u001c\u0010\u0005\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\t\u001a!\u0010\n\u001a\u00020\u000b*\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\t2\b\b\u0002\u0010\f\u001a\u00020\rH\u0087\b\u001a!\u0010\u000e\u001a\u00020\u000f*\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\t2\b\b\u0002\u0010\f\u001a\u00020\rH\u0087\b\u001aB\u0010\u0010\u001a\u00020\u0001*\u00020\u000226\u0010\u0011\u001a2\u0012\u0013\u0012\u00110\u0004¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0015\u0012\u0013\u0012\u00110\r¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0016\u0012\u0004\u0012\u00020\u00010\u0012\u001aJ\u0010\u0010\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0017\u001a\u00020\r26\u0010\u0011\u001a2\u0012\u0013\u0012\u00110\u0004¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0015\u0012\u0013\u0012\u00110\r¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0016\u0012\u0004\u0012\u00020\u00010\u0012\u001a7\u0010\u0018\u001a\u00020\u0001*\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\t2!\u0010\u0011\u001a\u001d\u0012\u0013\u0012\u00110\u0007¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u001a\u0012\u0004\u0012\u00020\u00010\u0019\u001a\r\u0010\u001b\u001a\u00020\u001c*\u00020\u0002H\u0087\b\u001a\r\u0010\u001d\u001a\u00020\u001e*\u00020\u0002H\u0087\b\u001a\u0017\u0010\u001f\u001a\u00020 *\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\tH\u0087\b\u001a\n\u0010!\u001a\u00020\u0004*\u00020\u0002\u001a\u001a\u0010\"\u001a\b\u0012\u0004\u0012\u00020\u00070#*\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\t\u001a\u0014\u0010$\u001a\u00020\u0007*\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\t\u001a\u0017\u0010%\u001a\u00020&*\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\tH\u0087\b\u001a?\u0010'\u001a\u0002H(\"\u0004\b\u0000\u0010(*\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\t2\u0018\u0010)\u001a\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00070*\u0012\u0004\u0012\u0002H(0\u0019H\u0086\bø\u0001\u0000¢\u0006\u0002\u0010+\u001a\u0012\u0010,\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0004\u001a\u001c\u0010-\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\t\u001a\u0017\u0010.\u001a\u00020/*\u00020\u00022\b\b\u0002\u0010\b\u001a\u00020\tH\u0087\b\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u00060"}, d2 = {"appendBytes", "", "Ljava/io/File;", "array", "", "appendText", "text", "", "charset", "Ljava/nio/charset/Charset;", "bufferedReader", "Ljava/io/BufferedReader;", "bufferSize", "", "bufferedWriter", "Ljava/io/BufferedWriter;", "forEachBlock", "action", "Lkotlin/Function2;", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "buffer", "bytesRead", "blockSize", "forEachLine", "Lkotlin/Function1;", "line", "inputStream", "Ljava/io/FileInputStream;", "outputStream", "Ljava/io/FileOutputStream;", "printWriter", "Ljava/io/PrintWriter;", "readBytes", "readLines", "", "readText", "reader", "Ljava/io/InputStreamReader;", "useLines", "T", "block", "Lkotlin/sequences/Sequence;", "(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;", "writeBytes", "writeText", "writer", "Ljava/io/OutputStreamWriter;", "kotlin-stdlib"}, k = 5, mv = {1, 9, 0}, xi = 49, xs = "kotlin/io/FilesKt")
|
||||
@SourceDebugExtension({"SMAP\nFileReadWrite.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FileReadWrite.kt\nkotlin/io/FilesKt__FileReadWriteKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,232:1\n1#2:233\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public class FilesKt__FileReadWriteKt extends FilesKt__FilePathComponentsKt {
|
||||
public static final void appendBytes(File file, byte[] array) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(array, "array");
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(file, true);
|
||||
try {
|
||||
fileOutputStream.write(array);
|
||||
Unit unit = Unit.INSTANCE;
|
||||
CloseableKt.closeFinally(fileOutputStream, null);
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
public static final void appendText(File file, String text, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(text, "text");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
byte[] bytes = text.getBytes(charset);
|
||||
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
||||
appendBytes(file, bytes);
|
||||
}
|
||||
|
||||
public static /* synthetic */ void appendText$default(File file, String str, Charset charset, int i, Object obj) {
|
||||
if ((i & 2) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
appendText(file, str, charset);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final BufferedReader bufferedReader(File file, Charset charset, int i) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new BufferedReader(new InputStreamReader(new FileInputStream(file), charset), i);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BufferedReader bufferedReader$default(File file, Charset charset, int i, int i4, Object obj) {
|
||||
if ((i4 & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
if ((i4 & 2) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new BufferedReader(new InputStreamReader(new FileInputStream(file), charset), i);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final BufferedWriter bufferedWriter(File file, Charset charset, int i) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset), i);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BufferedWriter bufferedWriter$default(File file, Charset charset, int i, int i4, Object obj) {
|
||||
if ((i4 & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
if ((i4 & 2) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset), i);
|
||||
}
|
||||
|
||||
public static final void forEachBlock(File file, Function2<? super byte[], ? super Integer, Unit> action) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
forEachBlock(file, ConstantsKt.DEFAULT_BLOCK_SIZE, action);
|
||||
}
|
||||
|
||||
public static final void forEachLine(File file, Charset charset, Function1<? super String, Unit> action) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
TextStreamsKt.forEachLine(new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)), action);
|
||||
}
|
||||
|
||||
public static /* synthetic */ void forEachLine$default(File file, Charset charset, Function1 function1, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
forEachLine(file, charset, function1);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final FileInputStream inputStream(File file) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
return new FileInputStream(file);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final FileOutputStream outputStream(File file) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
return new FileOutputStream(file);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final PrintWriter printWriter(File file, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset), 8192));
|
||||
}
|
||||
|
||||
public static /* synthetic */ PrintWriter printWriter$default(File file, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset), 8192));
|
||||
}
|
||||
|
||||
public static final byte[] readBytes(File file) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
FileInputStream fileInputStream = new FileInputStream(file);
|
||||
try {
|
||||
long length = file.length();
|
||||
if (length > 2147483647L) {
|
||||
throw new OutOfMemoryError("File " + file + " is too big (" + length + " bytes) to fit in memory.");
|
||||
}
|
||||
int i = (int) length;
|
||||
byte[] bArr = new byte[i];
|
||||
int i4 = i;
|
||||
int i5 = 0;
|
||||
while (i4 > 0) {
|
||||
int read = fileInputStream.read(bArr, i5, i4);
|
||||
if (read < 0) {
|
||||
break;
|
||||
}
|
||||
i4 -= read;
|
||||
i5 += read;
|
||||
}
|
||||
if (i4 > 0) {
|
||||
bArr = Arrays.copyOf(bArr, i5);
|
||||
Intrinsics.checkNotNullExpressionValue(bArr, "copyOf(...)");
|
||||
} else {
|
||||
int read2 = fileInputStream.read();
|
||||
if (read2 != -1) {
|
||||
ExposingBufferByteArrayOutputStream exposingBufferByteArrayOutputStream = new ExposingBufferByteArrayOutputStream(8193);
|
||||
exposingBufferByteArrayOutputStream.write(read2);
|
||||
ByteStreamsKt.copyTo$default(fileInputStream, exposingBufferByteArrayOutputStream, 0, 2, null);
|
||||
int size = exposingBufferByteArrayOutputStream.size() + i;
|
||||
if (size < 0) {
|
||||
throw new OutOfMemoryError("File " + file + " is too big to fit in memory.");
|
||||
}
|
||||
byte[] buffer = exposingBufferByteArrayOutputStream.getBuffer();
|
||||
byte[] copyOf = Arrays.copyOf(bArr, size);
|
||||
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
|
||||
bArr = ArraysKt.copyInto(buffer, copyOf, i, 0, exposingBufferByteArrayOutputStream.size());
|
||||
}
|
||||
}
|
||||
CloseableKt.closeFinally(fileInputStream, null);
|
||||
return bArr;
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
throw th;
|
||||
} catch (Throwable th2) {
|
||||
CloseableKt.closeFinally(fileInputStream, th);
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final List<String> readLines(File file, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
final ArrayList arrayList = new ArrayList();
|
||||
forEachLine(file, charset, new Function1<String, Unit>() { // from class: kotlin.io.FilesKt__FileReadWriteKt$readLines$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(String str) {
|
||||
invoke2(str);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(String it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
arrayList.add(it);
|
||||
}
|
||||
});
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public static /* synthetic */ List readLines$default(File file, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
return readLines(file, charset);
|
||||
}
|
||||
|
||||
public static final String readText(File file, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(file), charset);
|
||||
try {
|
||||
String readText = TextStreamsKt.readText(inputStreamReader);
|
||||
CloseableKt.closeFinally(inputStreamReader, null);
|
||||
return readText;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
public static /* synthetic */ String readText$default(File file, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
return readText(file, charset);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final InputStreamReader reader(File file, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new InputStreamReader(new FileInputStream(file), charset);
|
||||
}
|
||||
|
||||
public static /* synthetic */ InputStreamReader reader$default(File file, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new InputStreamReader(new FileInputStream(file), charset);
|
||||
}
|
||||
|
||||
public static final <T> T useLines(File file, Charset charset, Function1<? super Sequence<String>, ? extends T> block) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset), 8192);
|
||||
try {
|
||||
T invoke = block.invoke(TextStreamsKt.lineSequence(bufferedReader));
|
||||
InlineMarker.finallyStart(1);
|
||||
if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) {
|
||||
CloseableKt.closeFinally(bufferedReader, null);
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
}
|
||||
InlineMarker.finallyEnd(1);
|
||||
return invoke;
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
throw th;
|
||||
} catch (Throwable th2) {
|
||||
InlineMarker.finallyStart(1);
|
||||
if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) {
|
||||
CloseableKt.closeFinally(bufferedReader, th);
|
||||
} else {
|
||||
try {
|
||||
bufferedReader.close();
|
||||
} catch (Throwable unused) {
|
||||
}
|
||||
}
|
||||
InlineMarker.finallyEnd(1);
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static /* synthetic */ Object useLines$default(File file, Charset charset, Function1 block, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset), 8192);
|
||||
try {
|
||||
Object invoke = block.invoke(TextStreamsKt.lineSequence(bufferedReader));
|
||||
InlineMarker.finallyStart(1);
|
||||
if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) {
|
||||
CloseableKt.closeFinally(bufferedReader, null);
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
}
|
||||
InlineMarker.finallyEnd(1);
|
||||
return invoke;
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
throw th;
|
||||
} catch (Throwable th2) {
|
||||
InlineMarker.finallyStart(1);
|
||||
if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) {
|
||||
CloseableKt.closeFinally(bufferedReader, th);
|
||||
} else {
|
||||
try {
|
||||
bufferedReader.close();
|
||||
} catch (Throwable unused) {
|
||||
}
|
||||
}
|
||||
InlineMarker.finallyEnd(1);
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final void writeBytes(File file, byte[] array) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(array, "array");
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(file);
|
||||
try {
|
||||
fileOutputStream.write(array);
|
||||
Unit unit = Unit.INSTANCE;
|
||||
CloseableKt.closeFinally(fileOutputStream, null);
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
public static final void writeText(File file, String text, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(text, "text");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
byte[] bytes = text.getBytes(charset);
|
||||
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
||||
writeBytes(file, bytes);
|
||||
}
|
||||
|
||||
public static /* synthetic */ void writeText$default(File file, String str, Charset charset, int i, Object obj) {
|
||||
if ((i & 2) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
writeText(file, str, charset);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final OutputStreamWriter writer(File file, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new OutputStreamWriter(new FileOutputStream(file), charset);
|
||||
}
|
||||
|
||||
public static /* synthetic */ OutputStreamWriter writer$default(File file, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new OutputStreamWriter(new FileOutputStream(file), charset);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r2v2, types: [java.lang.Object, byte[]] */
|
||||
public static final void forEachBlock(File file, int i, Function2<? super byte[], ? super Integer, Unit> action) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
?? r22 = new byte[RangesKt.coerceAtLeast(i, ConstantsKt.MINIMUM_BLOCK_SIZE)];
|
||||
FileInputStream fileInputStream = new FileInputStream(file);
|
||||
while (true) {
|
||||
try {
|
||||
int read = fileInputStream.read(r22);
|
||||
if (read <= 0) {
|
||||
Unit unit = Unit.INSTANCE;
|
||||
CloseableKt.closeFinally(fileInputStream, null);
|
||||
return;
|
||||
}
|
||||
action.invoke(r22, Integer.valueOf(read));
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
throw th;
|
||||
} catch (Throwable th2) {
|
||||
CloseableKt.closeFinally(fileInputStream, th);
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.File;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u001a\u0014\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\b\b\u0002\u0010\u0003\u001a\u00020\u0004\u001a\n\u0010\u0005\u001a\u00020\u0001*\u00020\u0002\u001a\n\u0010\u0006\u001a\u00020\u0001*\u00020\u0002¨\u0006\u0007"}, d2 = {"walk", "Lkotlin/io/FileTreeWalk;", "Ljava/io/File;", "direction", "Lkotlin/io/FileWalkDirection;", "walkBottomUp", "walkTopDown", "kotlin-stdlib"}, k = 5, mv = {1, 9, 0}, xi = 49, xs = "kotlin/io/FilesKt")
|
||||
/* loaded from: classes3.dex */
|
||||
class FilesKt__FileTreeWalkKt extends FilesKt__FileReadWriteKt {
|
||||
public static final FileTreeWalk walk(File file, FileWalkDirection direction) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(direction, "direction");
|
||||
return new FileTreeWalk(file, direction);
|
||||
}
|
||||
|
||||
public static /* synthetic */ FileTreeWalk walk$default(File file, FileWalkDirection fileWalkDirection, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
fileWalkDirection = FileWalkDirection.TOP_DOWN;
|
||||
}
|
||||
return walk(file, fileWalkDirection);
|
||||
}
|
||||
|
||||
public static final FileTreeWalk walkBottomUp(File file) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
return walk(file, FileWalkDirection.BOTTOM_UP);
|
||||
}
|
||||
|
||||
public static final FileTreeWalk walkTopDown(File file) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
return walk(file, FileWalkDirection.TOP_DOWN);
|
||||
}
|
||||
}
|
||||
432
apk_decompiled/sources/kotlin/io/FilesKt__UtilsKt.java
Normal file
432
apk_decompiled/sources/kotlin/io/FilesKt__UtilsKt.java
Normal file
@@ -0,0 +1,432 @@
|
||||
package kotlin.io;
|
||||
|
||||
import com.google.firebase.dynamiclinks.DynamicLink;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.collections.CollectionsKt___CollectionsKt;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.text.StringsKt__StringsJVMKt;
|
||||
import kotlin.text.StringsKt__StringsKt;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
@Metadata(d1 = {"\u0000<\n\u0000\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010 \n\u0000\n\u0002\u0018\u0002\n\u0002\b\f\u001a*\u0010\t\u001a\u00020\u00022\b\b\u0002\u0010\n\u001a\u00020\u00012\n\b\u0002\u0010\u000b\u001a\u0004\u0018\u00010\u00012\n\b\u0002\u0010\f\u001a\u0004\u0018\u00010\u0002H\u0007\u001a*\u0010\r\u001a\u00020\u00022\b\b\u0002\u0010\n\u001a\u00020\u00012\n\b\u0002\u0010\u000b\u001a\u0004\u0018\u00010\u00012\n\b\u0002\u0010\f\u001a\u0004\u0018\u00010\u0002H\u0007\u001a8\u0010\u000e\u001a\u00020\u000f*\u00020\u00022\u0006\u0010\u0010\u001a\u00020\u00022\b\b\u0002\u0010\u0011\u001a\u00020\u000f2\u001a\b\u0002\u0010\u0012\u001a\u0014\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0014\u0012\u0004\u0012\u00020\u00150\u0013\u001a&\u0010\u0016\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\u0010\u001a\u00020\u00022\b\b\u0002\u0010\u0011\u001a\u00020\u000f2\b\b\u0002\u0010\u0017\u001a\u00020\u0018\u001a\n\u0010\u0019\u001a\u00020\u000f*\u00020\u0002\u001a\u0012\u0010\u001a\u001a\u00020\u000f*\u00020\u00022\u0006\u0010\u001b\u001a\u00020\u0002\u001a\u0012\u0010\u001a\u001a\u00020\u000f*\u00020\u00022\u0006\u0010\u001b\u001a\u00020\u0001\u001a\n\u0010\u001c\u001a\u00020\u0002*\u00020\u0002\u001a\u001d\u0010\u001c\u001a\b\u0012\u0004\u0012\u00020\u00020\u001d*\b\u0012\u0004\u0012\u00020\u00020\u001dH\u0002¢\u0006\u0002\b\u001e\u001a\u0011\u0010\u001c\u001a\u00020\u001f*\u00020\u001fH\u0002¢\u0006\u0002\b\u001e\u001a\u0012\u0010 \u001a\u00020\u0002*\u00020\u00022\u0006\u0010!\u001a\u00020\u0002\u001a\u0014\u0010\"\u001a\u0004\u0018\u00010\u0002*\u00020\u00022\u0006\u0010!\u001a\u00020\u0002\u001a\u0012\u0010#\u001a\u00020\u0002*\u00020\u00022\u0006\u0010!\u001a\u00020\u0002\u001a\u0012\u0010$\u001a\u00020\u0002*\u00020\u00022\u0006\u0010%\u001a\u00020\u0002\u001a\u0012\u0010$\u001a\u00020\u0002*\u00020\u00022\u0006\u0010%\u001a\u00020\u0001\u001a\u0012\u0010&\u001a\u00020\u0002*\u00020\u00022\u0006\u0010%\u001a\u00020\u0002\u001a\u0012\u0010&\u001a\u00020\u0002*\u00020\u00022\u0006\u0010%\u001a\u00020\u0001\u001a\u0012\u0010'\u001a\u00020\u000f*\u00020\u00022\u0006\u0010\u001b\u001a\u00020\u0002\u001a\u0012\u0010'\u001a\u00020\u000f*\u00020\u00022\u0006\u0010\u001b\u001a\u00020\u0001\u001a\u0012\u0010(\u001a\u00020\u0001*\u00020\u00022\u0006\u0010!\u001a\u00020\u0002\u001a\u001b\u0010)\u001a\u0004\u0018\u00010\u0001*\u00020\u00022\u0006\u0010!\u001a\u00020\u0002H\u0002¢\u0006\u0002\b*\"\u0015\u0010\u0000\u001a\u00020\u0001*\u00020\u00028F¢\u0006\u0006\u001a\u0004\b\u0003\u0010\u0004\"\u0015\u0010\u0005\u001a\u00020\u0001*\u00020\u00028F¢\u0006\u0006\u001a\u0004\b\u0006\u0010\u0004\"\u0015\u0010\u0007\u001a\u00020\u0001*\u00020\u00028F¢\u0006\u0006\u001a\u0004\b\b\u0010\u0004¨\u0006+"}, d2 = {"extension", "", "Ljava/io/File;", "getExtension", "(Ljava/io/File;)Ljava/lang/String;", "invariantSeparatorsPath", "getInvariantSeparatorsPath", "nameWithoutExtension", "getNameWithoutExtension", "createTempDir", "prefix", DynamicLink.Builder.KEY_SUFFIX, "directory", "createTempFile", "copyRecursively", "", "target", "overwrite", "onError", "Lkotlin/Function2;", "Ljava/io/IOException;", "Lkotlin/io/OnErrorAction;", "copyTo", "bufferSize", "", "deleteRecursively", "endsWith", "other", "normalize", "", "normalize$FilesKt__UtilsKt", "Lkotlin/io/FilePathComponents;", "relativeTo", "base", "relativeToOrNull", "relativeToOrSelf", "resolve", "relative", "resolveSibling", "startsWith", "toRelativeString", "toRelativeStringOrNull", "toRelativeStringOrNull$FilesKt__UtilsKt", "kotlin-stdlib"}, k = 5, mv = {1, 9, 0}, xi = 49, xs = "kotlin/io/FilesKt")
|
||||
@SourceDebugExtension({"SMAP\nUtils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Utils.kt\nkotlin/io/FilesKt__UtilsKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Sequences.kt\nkotlin/sequences/SequencesKt___SequencesKt\n*L\n1#1,473:1\n1#2:474\n1284#3,3:475\n*S KotlinDebug\n*F\n+ 1 Utils.kt\nkotlin/io/FilesKt__UtilsKt\n*L\n347#1:475,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public class FilesKt__UtilsKt extends FilesKt__FileTreeWalkKt {
|
||||
public static final boolean copyRecursively(File file, File target, boolean z3, final Function2<? super File, ? super IOException, ? extends OnErrorAction> onError) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(target, "target");
|
||||
Intrinsics.checkNotNullParameter(onError, "onError");
|
||||
if (!file.exists()) {
|
||||
return onError.invoke(file, new NoSuchFileException(file, null, "The source file doesn't exist.", 2, null)) != OnErrorAction.TERMINATE;
|
||||
}
|
||||
try {
|
||||
Iterator<File> it = FilesKt__FileTreeWalkKt.walkTopDown(file).onFail(new Function2<File, IOException, Unit>() { // from class: kotlin.io.FilesKt__UtilsKt$copyRecursively$2
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
{
|
||||
super(2);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public /* bridge */ /* synthetic */ Unit invoke(File file2, IOException iOException) {
|
||||
invoke2(file2, iOException);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(File f2, IOException e4) {
|
||||
Intrinsics.checkNotNullParameter(f2, "f");
|
||||
Intrinsics.checkNotNullParameter(e4, "e");
|
||||
if (onError.invoke(f2, e4) == OnErrorAction.TERMINATE) {
|
||||
throw new TerminateException(f2);
|
||||
}
|
||||
}
|
||||
}).iterator();
|
||||
while (it.hasNext()) {
|
||||
File next = it.next();
|
||||
if (next.exists()) {
|
||||
File file2 = new File(target, toRelativeString(next, file));
|
||||
if (file2.exists() && (!next.isDirectory() || !file2.isDirectory())) {
|
||||
if (z3) {
|
||||
if (file2.isDirectory()) {
|
||||
if (!deleteRecursively(file2)) {
|
||||
}
|
||||
} else if (!file2.delete()) {
|
||||
}
|
||||
}
|
||||
if (onError.invoke(file2, new FileAlreadyExistsException(next, file2, "The destination file already exists.")) == OnErrorAction.TERMINATE) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (next.isDirectory()) {
|
||||
file2.mkdirs();
|
||||
} else {
|
||||
boolean z4 = z3;
|
||||
if (copyTo$default(next, file2, z4, 0, 4, null).length() != next.length() && onError.invoke(next, new IOException("Source file wasn't copied completely, length of destination file differs.")) == OnErrorAction.TERMINATE) {
|
||||
return false;
|
||||
}
|
||||
z3 = z4;
|
||||
}
|
||||
} else if (onError.invoke(next, new NoSuchFileException(next, null, "The source file doesn't exist.", 2, null)) == OnErrorAction.TERMINATE) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} catch (TerminateException unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static /* synthetic */ boolean copyRecursively$default(File file, File file2, boolean z3, Function2 function2, int i, Object obj) {
|
||||
if ((i & 2) != 0) {
|
||||
z3 = false;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
function2 = new Function2() { // from class: kotlin.io.FilesKt__UtilsKt$copyRecursively$1
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Void invoke(File file3, IOException exception) {
|
||||
Intrinsics.checkNotNullParameter(file3, "<anonymous parameter 0>");
|
||||
Intrinsics.checkNotNullParameter(exception, "exception");
|
||||
throw exception;
|
||||
}
|
||||
};
|
||||
}
|
||||
return copyRecursively(file, file2, z3, function2);
|
||||
}
|
||||
|
||||
public static final File copyTo(File file, File target, boolean z3, int i) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(target, "target");
|
||||
if (!file.exists()) {
|
||||
throw new NoSuchFileException(file, null, "The source file doesn't exist.", 2, null);
|
||||
}
|
||||
if (target.exists()) {
|
||||
if (!z3) {
|
||||
throw new FileAlreadyExistsException(file, target, "The destination file already exists.");
|
||||
}
|
||||
if (!target.delete()) {
|
||||
throw new FileAlreadyExistsException(file, target, "Tried to overwrite the destination, but failed to delete it.");
|
||||
}
|
||||
}
|
||||
if (file.isDirectory()) {
|
||||
if (target.mkdirs()) {
|
||||
return target;
|
||||
}
|
||||
throw new FileSystemException(file, target, "Failed to create target directory.");
|
||||
}
|
||||
File parentFile = target.getParentFile();
|
||||
if (parentFile != null) {
|
||||
parentFile.mkdirs();
|
||||
}
|
||||
FileInputStream fileInputStream = new FileInputStream(file);
|
||||
try {
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(target);
|
||||
try {
|
||||
ByteStreamsKt.copyTo(fileInputStream, fileOutputStream, i);
|
||||
CloseableKt.closeFinally(fileOutputStream, null);
|
||||
CloseableKt.closeFinally(fileInputStream, null);
|
||||
return target;
|
||||
} finally {
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
public static /* synthetic */ File copyTo$default(File file, File file2, boolean z3, int i, int i4, Object obj) {
|
||||
if ((i4 & 2) != 0) {
|
||||
z3 = false;
|
||||
}
|
||||
if ((i4 & 4) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
return copyTo(file, file2, z3, i);
|
||||
}
|
||||
|
||||
@Deprecated(message = "Avoid creating temporary directories in the default temp location with this function due to too wide permissions on the newly created directory. Use kotlin.io.path.createTempDirectory instead.")
|
||||
public static final File createTempDir(String prefix, String str, File file) {
|
||||
Intrinsics.checkNotNullParameter(prefix, "prefix");
|
||||
File createTempFile = File.createTempFile(prefix, str, file);
|
||||
createTempFile.delete();
|
||||
if (createTempFile.mkdir()) {
|
||||
Intrinsics.checkNotNull(createTempFile);
|
||||
return createTempFile;
|
||||
}
|
||||
throw new IOException("Unable to create temporary directory " + createTempFile + '.');
|
||||
}
|
||||
|
||||
public static /* synthetic */ File createTempDir$default(String str, String str2, File file, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
str = "tmp";
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
str2 = null;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
file = null;
|
||||
}
|
||||
return createTempDir(str, str2, file);
|
||||
}
|
||||
|
||||
@Deprecated(message = "Avoid creating temporary files in the default temp location with this function due to too wide permissions on the newly created file. Use kotlin.io.path.createTempFile instead or resort to java.io.File.createTempFile.")
|
||||
public static final File createTempFile(String prefix, String str, File file) {
|
||||
Intrinsics.checkNotNullParameter(prefix, "prefix");
|
||||
File createTempFile = File.createTempFile(prefix, str, file);
|
||||
Intrinsics.checkNotNullExpressionValue(createTempFile, "createTempFile(...)");
|
||||
return createTempFile;
|
||||
}
|
||||
|
||||
public static /* synthetic */ File createTempFile$default(String str, String str2, File file, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
str = "tmp";
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
str2 = null;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
file = null;
|
||||
}
|
||||
return createTempFile(str, str2, file);
|
||||
}
|
||||
|
||||
public static final boolean deleteRecursively(File file) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
while (true) {
|
||||
boolean z3 = true;
|
||||
for (File file2 : FilesKt__FileTreeWalkKt.walkBottomUp(file)) {
|
||||
if (file2.delete() || !file2.exists()) {
|
||||
if (z3) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
z3 = false;
|
||||
}
|
||||
return z3;
|
||||
}
|
||||
}
|
||||
|
||||
public static final boolean endsWith(File file, File other) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
FilePathComponents components = FilesKt__FilePathComponentsKt.toComponents(file);
|
||||
FilePathComponents components2 = FilesKt__FilePathComponentsKt.toComponents(other);
|
||||
if (components2.isRooted()) {
|
||||
return Intrinsics.areEqual(file, other);
|
||||
}
|
||||
int size = components.getSize() - components2.getSize();
|
||||
if (size < 0) {
|
||||
return false;
|
||||
}
|
||||
return components.getSegments().subList(size, components.getSize()).equals(components2.getSegments());
|
||||
}
|
||||
|
||||
public static String getExtension(File file) {
|
||||
String substringAfterLast;
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
String name = file.getName();
|
||||
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
|
||||
substringAfterLast = StringsKt__StringsKt.substringAfterLast(name, '.', "");
|
||||
return substringAfterLast;
|
||||
}
|
||||
|
||||
public static final String getInvariantSeparatorsPath(File file) {
|
||||
String replace$default;
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
char c4 = File.separatorChar;
|
||||
String path = file.getPath();
|
||||
Intrinsics.checkNotNullExpressionValue(path, "getPath(...)");
|
||||
if (c4 == '/') {
|
||||
return path;
|
||||
}
|
||||
replace$default = StringsKt__StringsJVMKt.replace$default(path, c4, '/', false, 4, (Object) null);
|
||||
return replace$default;
|
||||
}
|
||||
|
||||
public static final String getNameWithoutExtension(File file) {
|
||||
String substringBeforeLast$default;
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
String name = file.getName();
|
||||
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
|
||||
substringBeforeLast$default = StringsKt__StringsKt.substringBeforeLast$default(name, ".", (String) null, 2, (Object) null);
|
||||
return substringBeforeLast$default;
|
||||
}
|
||||
|
||||
public static final File normalize(File file) {
|
||||
String joinToString$default;
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
FilePathComponents components = FilesKt__FilePathComponentsKt.toComponents(file);
|
||||
File root = components.getRoot();
|
||||
List<File> normalize$FilesKt__UtilsKt = normalize$FilesKt__UtilsKt(components.getSegments());
|
||||
String separator = File.separator;
|
||||
Intrinsics.checkNotNullExpressionValue(separator, "separator");
|
||||
joinToString$default = CollectionsKt___CollectionsKt.joinToString$default(normalize$FilesKt__UtilsKt, separator, null, null, 0, null, null, 62, null);
|
||||
return resolve(root, joinToString$default);
|
||||
}
|
||||
|
||||
private static final FilePathComponents normalize$FilesKt__UtilsKt(FilePathComponents filePathComponents) {
|
||||
return new FilePathComponents(filePathComponents.getRoot(), normalize$FilesKt__UtilsKt(filePathComponents.getSegments()));
|
||||
}
|
||||
|
||||
public static final File relativeTo(File file, File base) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(base, "base");
|
||||
return new File(toRelativeString(file, base));
|
||||
}
|
||||
|
||||
public static final File relativeToOrNull(File file, File base) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(base, "base");
|
||||
String relativeStringOrNull$FilesKt__UtilsKt = toRelativeStringOrNull$FilesKt__UtilsKt(file, base);
|
||||
if (relativeStringOrNull$FilesKt__UtilsKt != null) {
|
||||
return new File(relativeStringOrNull$FilesKt__UtilsKt);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final File relativeToOrSelf(File file, File base) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(base, "base");
|
||||
String relativeStringOrNull$FilesKt__UtilsKt = toRelativeStringOrNull$FilesKt__UtilsKt(file, base);
|
||||
return relativeStringOrNull$FilesKt__UtilsKt != null ? new File(relativeStringOrNull$FilesKt__UtilsKt) : file;
|
||||
}
|
||||
|
||||
public static final File resolve(File file, File relative) {
|
||||
boolean endsWith$default;
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(relative, "relative");
|
||||
if (FilesKt__FilePathComponentsKt.isRooted(relative)) {
|
||||
return relative;
|
||||
}
|
||||
String file2 = file.toString();
|
||||
Intrinsics.checkNotNullExpressionValue(file2, "toString(...)");
|
||||
if (file2.length() != 0) {
|
||||
char c4 = File.separatorChar;
|
||||
endsWith$default = StringsKt__StringsKt.endsWith$default((CharSequence) file2, c4, false, 2, (Object) null);
|
||||
if (!endsWith$default) {
|
||||
return new File(file2 + c4 + relative);
|
||||
}
|
||||
}
|
||||
return new File(file2 + relative);
|
||||
}
|
||||
|
||||
public static final File resolveSibling(File file, File relative) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(relative, "relative");
|
||||
FilePathComponents components = FilesKt__FilePathComponentsKt.toComponents(file);
|
||||
return resolve(resolve(components.getRoot(), components.getSize() == 0 ? new File("..") : components.subPath(0, components.getSize() - 1)), relative);
|
||||
}
|
||||
|
||||
public static final boolean startsWith(File file, File other) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
FilePathComponents components = FilesKt__FilePathComponentsKt.toComponents(file);
|
||||
FilePathComponents components2 = FilesKt__FilePathComponentsKt.toComponents(other);
|
||||
if (Intrinsics.areEqual(components.getRoot(), components2.getRoot()) && components.getSize() >= components2.getSize()) {
|
||||
return components.getSegments().subList(0, components2.getSize()).equals(components2.getSegments());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static final String toRelativeString(File file, File base) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(base, "base");
|
||||
String relativeStringOrNull$FilesKt__UtilsKt = toRelativeStringOrNull$FilesKt__UtilsKt(file, base);
|
||||
if (relativeStringOrNull$FilesKt__UtilsKt != null) {
|
||||
return relativeStringOrNull$FilesKt__UtilsKt;
|
||||
}
|
||||
throw new IllegalArgumentException("this and base files have different roots: " + file + " and " + base + '.');
|
||||
}
|
||||
|
||||
private static final String toRelativeStringOrNull$FilesKt__UtilsKt(File file, File file2) {
|
||||
FilePathComponents normalize$FilesKt__UtilsKt = normalize$FilesKt__UtilsKt(FilesKt__FilePathComponentsKt.toComponents(file));
|
||||
FilePathComponents normalize$FilesKt__UtilsKt2 = normalize$FilesKt__UtilsKt(FilesKt__FilePathComponentsKt.toComponents(file2));
|
||||
if (!Intrinsics.areEqual(normalize$FilesKt__UtilsKt.getRoot(), normalize$FilesKt__UtilsKt2.getRoot())) {
|
||||
return null;
|
||||
}
|
||||
int size = normalize$FilesKt__UtilsKt2.getSize();
|
||||
int size2 = normalize$FilesKt__UtilsKt.getSize();
|
||||
int min = Math.min(size2, size);
|
||||
int i = 0;
|
||||
while (i < min && Intrinsics.areEqual(normalize$FilesKt__UtilsKt.getSegments().get(i), normalize$FilesKt__UtilsKt2.getSegments().get(i))) {
|
||||
i++;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int i4 = size - 1;
|
||||
if (i <= i4) {
|
||||
while (!Intrinsics.areEqual(normalize$FilesKt__UtilsKt2.getSegments().get(i4).getName(), "..")) {
|
||||
sb.append("..");
|
||||
if (i4 != i) {
|
||||
sb.append(File.separatorChar);
|
||||
}
|
||||
if (i4 != i) {
|
||||
i4--;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (i < size2) {
|
||||
if (i < size) {
|
||||
sb.append(File.separatorChar);
|
||||
}
|
||||
List drop = CollectionsKt.drop(normalize$FilesKt__UtilsKt.getSegments(), i);
|
||||
String separator = File.separator;
|
||||
Intrinsics.checkNotNullExpressionValue(separator, "separator");
|
||||
CollectionsKt___CollectionsKt.joinTo$default(drop, sb, separator, null, null, 0, null, null, 124, null);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static final List<File> normalize$FilesKt__UtilsKt(List<? extends File> list) {
|
||||
ArrayList arrayList = new ArrayList(list.size());
|
||||
for (File file : list) {
|
||||
String name = file.getName();
|
||||
if (!Intrinsics.areEqual(name, ".")) {
|
||||
if (Intrinsics.areEqual(name, "..")) {
|
||||
if (arrayList.isEmpty() || Intrinsics.areEqual(((File) CollectionsKt.last((List) arrayList)).getName(), "..")) {
|
||||
arrayList.add(file);
|
||||
} else {
|
||||
arrayList.remove(arrayList.size() - 1);
|
||||
}
|
||||
} else {
|
||||
arrayList.add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public static File resolve(File file, String relative) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(relative, "relative");
|
||||
return resolve(file, new File(relative));
|
||||
}
|
||||
|
||||
public static final File resolveSibling(File file, String relative) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(relative, "relative");
|
||||
return resolveSibling(file, new File(relative));
|
||||
}
|
||||
|
||||
public static final boolean startsWith(File file, String other) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
return startsWith(file, new File(other));
|
||||
}
|
||||
|
||||
public static final boolean endsWith(File file, String other) {
|
||||
Intrinsics.checkNotNullParameter(file, "<this>");
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
return endsWith(file, new File(other));
|
||||
}
|
||||
}
|
||||
328
apk_decompiled/sources/kotlin/io/LineReader.java
Normal file
328
apk_decompiled/sources/kotlin/io/LineReader.java
Normal file
@@ -0,0 +1,328 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CoderResult;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
|
||||
@Metadata(d1 = {"\u0000\\\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0019\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\b\u0010\u0014\u001a\u00020\u0004H\u0002J\u0010\u0010\u0015\u001a\u00020\u00042\u0006\u0010\u0016\u001a\u00020\u0010H\u0002J\u0018\u0010\u0017\u001a\u00020\u00042\u0006\u0010\u0018\u001a\u00020\u00042\u0006\u0010\u0019\u001a\u00020\u0004H\u0002J\u0018\u0010\u001a\u001a\u0004\u0018\u00010\u001b2\u0006\u0010\u001c\u001a\u00020\u001d2\u0006\u0010\u001e\u001a\u00020\u001fJ\b\u0010 \u001a\u00020!H\u0002J\b\u0010\"\u001a\u00020!H\u0002J\u0010\u0010#\u001a\u00020!2\u0006\u0010\u001e\u001a\u00020\u001fH\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\fX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u000eX\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\u000f\u001a\u00020\u0010X\u0082\u000e¢\u0006\u0002\n\u0000R\u0012\u0010\u0011\u001a\u00060\u0012j\u0002`\u0013X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006$"}, d2 = {"Lkotlin/io/LineReader;", "", "()V", "BUFFER_SIZE", "", "byteBuf", "Ljava/nio/ByteBuffer;", "bytes", "", "charBuf", "Ljava/nio/CharBuffer;", "chars", "", "decoder", "Ljava/nio/charset/CharsetDecoder;", "directEOL", "", "sb", "Ljava/lang/StringBuilder;", "Lkotlin/text/StringBuilder;", "compactBytes", "decode", "endOfInput", "decodeEndOfInput", "nBytes", "nChars", "readLine", "", "inputStream", "Ljava/io/InputStream;", "charset", "Ljava/nio/charset/Charset;", "resetAll", "", "trimStringBuilder", "updateCharset", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nConsole.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Console.kt\nkotlin/io/LineReader\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,299:1\n1#2:300\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LineReader {
|
||||
private static final int BUFFER_SIZE = 32;
|
||||
public static final LineReader INSTANCE = new LineReader();
|
||||
private static final ByteBuffer byteBuf;
|
||||
private static final byte[] bytes;
|
||||
private static final CharBuffer charBuf;
|
||||
private static final char[] chars;
|
||||
private static CharsetDecoder decoder;
|
||||
private static boolean directEOL;
|
||||
private static final StringBuilder sb;
|
||||
|
||||
static {
|
||||
byte[] bArr = new byte[32];
|
||||
bytes = bArr;
|
||||
char[] cArr = new char[32];
|
||||
chars = cArr;
|
||||
ByteBuffer wrap = ByteBuffer.wrap(bArr);
|
||||
Intrinsics.checkNotNullExpressionValue(wrap, "wrap(...)");
|
||||
byteBuf = wrap;
|
||||
CharBuffer wrap2 = CharBuffer.wrap(cArr);
|
||||
Intrinsics.checkNotNullExpressionValue(wrap2, "wrap(...)");
|
||||
charBuf = wrap2;
|
||||
sb = new StringBuilder();
|
||||
}
|
||||
|
||||
private LineReader() {
|
||||
}
|
||||
|
||||
private final int compactBytes() {
|
||||
ByteBuffer byteBuffer = byteBuf;
|
||||
byteBuffer.compact();
|
||||
int position = byteBuffer.position();
|
||||
byteBuffer.position(0);
|
||||
return position;
|
||||
}
|
||||
|
||||
private final int decode(boolean endOfInput) {
|
||||
while (true) {
|
||||
CharsetDecoder charsetDecoder = decoder;
|
||||
if (charsetDecoder == null) {
|
||||
Intrinsics.throwUninitializedPropertyAccessException("decoder");
|
||||
charsetDecoder = null;
|
||||
}
|
||||
ByteBuffer byteBuffer = byteBuf;
|
||||
CharBuffer charBuffer = charBuf;
|
||||
CoderResult decode = charsetDecoder.decode(byteBuffer, charBuffer, endOfInput);
|
||||
Intrinsics.checkNotNullExpressionValue(decode, "decode(...)");
|
||||
if (decode.isError()) {
|
||||
resetAll();
|
||||
decode.throwException();
|
||||
}
|
||||
int position = charBuffer.position();
|
||||
if (!decode.isOverflow()) {
|
||||
return position;
|
||||
}
|
||||
StringBuilder sb2 = sb;
|
||||
char[] cArr = chars;
|
||||
int i = position - 1;
|
||||
sb2.append(cArr, 0, i);
|
||||
charBuffer.position(0);
|
||||
charBuffer.limit(32);
|
||||
charBuffer.put(cArr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private final int decodeEndOfInput(int nBytes, int nChars) {
|
||||
ByteBuffer byteBuffer = byteBuf;
|
||||
byteBuffer.limit(nBytes);
|
||||
charBuf.position(nChars);
|
||||
int decode = decode(true);
|
||||
CharsetDecoder charsetDecoder = decoder;
|
||||
if (charsetDecoder == null) {
|
||||
Intrinsics.throwUninitializedPropertyAccessException("decoder");
|
||||
charsetDecoder = null;
|
||||
}
|
||||
charsetDecoder.reset();
|
||||
byteBuffer.position(0);
|
||||
return decode;
|
||||
}
|
||||
|
||||
private final void resetAll() {
|
||||
CharsetDecoder charsetDecoder = decoder;
|
||||
if (charsetDecoder == null) {
|
||||
Intrinsics.throwUninitializedPropertyAccessException("decoder");
|
||||
charsetDecoder = null;
|
||||
}
|
||||
charsetDecoder.reset();
|
||||
byteBuf.position(0);
|
||||
sb.setLength(0);
|
||||
}
|
||||
|
||||
private final void trimStringBuilder() {
|
||||
StringBuilder sb2 = sb;
|
||||
sb2.setLength(32);
|
||||
sb2.trimToSize();
|
||||
}
|
||||
|
||||
private final void updateCharset(Charset charset) {
|
||||
CharsetDecoder newDecoder = charset.newDecoder();
|
||||
Intrinsics.checkNotNullExpressionValue(newDecoder, "newDecoder(...)");
|
||||
decoder = newDecoder;
|
||||
ByteBuffer byteBuffer = byteBuf;
|
||||
byteBuffer.clear();
|
||||
CharBuffer charBuffer = charBuf;
|
||||
charBuffer.clear();
|
||||
byteBuffer.put((byte) 10);
|
||||
byteBuffer.flip();
|
||||
CharsetDecoder charsetDecoder = decoder;
|
||||
if (charsetDecoder == null) {
|
||||
Intrinsics.throwUninitializedPropertyAccessException("decoder");
|
||||
charsetDecoder = null;
|
||||
}
|
||||
boolean z3 = false;
|
||||
charsetDecoder.decode(byteBuffer, charBuffer, false);
|
||||
if (charBuffer.position() == 1 && charBuffer.get(0) == '\n') {
|
||||
z3 = true;
|
||||
}
|
||||
directEOL = z3;
|
||||
resetAll();
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:25:0x0078, code lost:
|
||||
|
||||
if (r10 <= 0) goto L43;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:26:0x007a, code lost:
|
||||
|
||||
r0 = kotlin.io.LineReader.chars;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:27:0x0080, code lost:
|
||||
|
||||
if (r0[r10 - 1] != '\n') goto L43;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:28:0x0082, code lost:
|
||||
|
||||
r1 = r10 - 1;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:29:0x0084, code lost:
|
||||
|
||||
if (r1 <= 0) goto L42;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:31:0x008c, code lost:
|
||||
|
||||
if (r0[r10 - 2] != '\r') goto L42;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:32:0x008e, code lost:
|
||||
|
||||
r10 = r10 - 2;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:33:0x0091, code lost:
|
||||
|
||||
r10 = r1;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:34:0x0092, code lost:
|
||||
|
||||
r0 = kotlin.io.LineReader.sb;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:35:0x0098, code lost:
|
||||
|
||||
if (r0.length() != 0) goto L48;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:38:0x00a2, code lost:
|
||||
|
||||
return new java.lang.String(kotlin.io.LineReader.chars, 0, r10);
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:40:0x00a3, code lost:
|
||||
|
||||
r0.append(kotlin.io.LineReader.chars, 0, r10);
|
||||
r10 = r0.toString();
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r10, "toString(...)");
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:41:0x00b5, code lost:
|
||||
|
||||
if (r0.length() <= 32) goto L51;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:42:0x00b7, code lost:
|
||||
|
||||
trimStringBuilder();
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:43:0x00ba, code lost:
|
||||
|
||||
r0.setLength(0);
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:45:0x00be, code lost:
|
||||
|
||||
return r10;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:8:0x0024, code lost:
|
||||
|
||||
if (kotlin.jvm.internal.Intrinsics.areEqual(r0.charset(), r11) == false) goto L11;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final synchronized java.lang.String readLine(java.io.InputStream r10, java.nio.charset.Charset r11) {
|
||||
/*
|
||||
r9 = this;
|
||||
monitor-enter(r9)
|
||||
java.lang.String r0 = "inputStream"
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r10, r0) // Catch: java.lang.Throwable -> L19
|
||||
java.lang.String r0 = "charset"
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r11, r0) // Catch: java.lang.Throwable -> L19
|
||||
java.nio.charset.CharsetDecoder r0 = kotlin.io.LineReader.decoder // Catch: java.lang.Throwable -> L19
|
||||
r1 = 0
|
||||
if (r0 == 0) goto L26
|
||||
if (r0 != 0) goto L1c
|
||||
java.lang.String r0 = "decoder"
|
||||
kotlin.jvm.internal.Intrinsics.throwUninitializedPropertyAccessException(r0) // Catch: java.lang.Throwable -> L19
|
||||
r0 = r1
|
||||
goto L1c
|
||||
L19:
|
||||
r10 = move-exception
|
||||
goto Lc5
|
||||
L1c:
|
||||
java.nio.charset.Charset r0 = r0.charset() // Catch: java.lang.Throwable -> L19
|
||||
boolean r0 = kotlin.jvm.internal.Intrinsics.areEqual(r0, r11) // Catch: java.lang.Throwable -> L19
|
||||
if (r0 != 0) goto L29
|
||||
L26:
|
||||
r9.updateCharset(r11) // Catch: java.lang.Throwable -> L19
|
||||
L29:
|
||||
r11 = 0
|
||||
r0 = r11
|
||||
r2 = r0
|
||||
L2c:
|
||||
int r3 = r10.read() // Catch: java.lang.Throwable -> L19
|
||||
r4 = 32
|
||||
r5 = -1
|
||||
r6 = 10
|
||||
if (r3 != r5) goto L4a
|
||||
java.lang.StringBuilder r10 = kotlin.io.LineReader.sb // Catch: java.lang.Throwable -> L19
|
||||
int r10 = r10.length() // Catch: java.lang.Throwable -> L19
|
||||
if (r10 != 0) goto L45
|
||||
if (r0 != 0) goto L45
|
||||
if (r2 != 0) goto L45
|
||||
monitor-exit(r9)
|
||||
return r1
|
||||
L45:
|
||||
int r10 = r9.decodeEndOfInput(r0, r2) // Catch: java.lang.Throwable -> L19
|
||||
goto L78
|
||||
L4a:
|
||||
byte[] r5 = kotlin.io.LineReader.bytes // Catch: java.lang.Throwable -> L19
|
||||
int r7 = r0 + 1
|
||||
byte r8 = (byte) r3 // Catch: java.lang.Throwable -> L19
|
||||
r5[r0] = r8 // Catch: java.lang.Throwable -> L19
|
||||
if (r3 == r6) goto L5c
|
||||
if (r7 == r4) goto L5c
|
||||
boolean r0 = kotlin.io.LineReader.directEOL // Catch: java.lang.Throwable -> L19
|
||||
if (r0 != 0) goto L5a
|
||||
goto L5c
|
||||
L5a:
|
||||
r0 = r7
|
||||
goto L2c
|
||||
L5c:
|
||||
java.nio.ByteBuffer r0 = kotlin.io.LineReader.byteBuf // Catch: java.lang.Throwable -> L19
|
||||
r0.limit(r7) // Catch: java.lang.Throwable -> L19
|
||||
java.nio.CharBuffer r3 = kotlin.io.LineReader.charBuf // Catch: java.lang.Throwable -> L19
|
||||
r3.position(r2) // Catch: java.lang.Throwable -> L19
|
||||
int r2 = r9.decode(r11) // Catch: java.lang.Throwable -> L19
|
||||
if (r2 <= 0) goto Lbf
|
||||
char[] r3 = kotlin.io.LineReader.chars // Catch: java.lang.Throwable -> L19
|
||||
int r5 = r2 + (-1)
|
||||
char r3 = r3[r5] // Catch: java.lang.Throwable -> L19
|
||||
if (r3 != r6) goto Lbf
|
||||
r0.position(r11) // Catch: java.lang.Throwable -> L19
|
||||
r10 = r2
|
||||
L78:
|
||||
if (r10 <= 0) goto L92
|
||||
char[] r0 = kotlin.io.LineReader.chars // Catch: java.lang.Throwable -> L19
|
||||
int r1 = r10 + (-1)
|
||||
char r1 = r0[r1] // Catch: java.lang.Throwable -> L19
|
||||
if (r1 != r6) goto L92
|
||||
int r1 = r10 + (-1)
|
||||
if (r1 <= 0) goto L91
|
||||
int r2 = r10 + (-2)
|
||||
char r0 = r0[r2] // Catch: java.lang.Throwable -> L19
|
||||
r2 = 13
|
||||
if (r0 != r2) goto L91
|
||||
int r10 = r10 + (-2)
|
||||
goto L92
|
||||
L91:
|
||||
r10 = r1
|
||||
L92:
|
||||
java.lang.StringBuilder r0 = kotlin.io.LineReader.sb // Catch: java.lang.Throwable -> L19
|
||||
int r1 = r0.length() // Catch: java.lang.Throwable -> L19
|
||||
if (r1 != 0) goto La3
|
||||
java.lang.String r0 = new java.lang.String // Catch: java.lang.Throwable -> L19
|
||||
char[] r1 = kotlin.io.LineReader.chars // Catch: java.lang.Throwable -> L19
|
||||
r0.<init>(r1, r11, r10) // Catch: java.lang.Throwable -> L19
|
||||
monitor-exit(r9)
|
||||
return r0
|
||||
La3:
|
||||
char[] r1 = kotlin.io.LineReader.chars // Catch: java.lang.Throwable -> L19
|
||||
r0.append(r1, r11, r10) // Catch: java.lang.Throwable -> L19
|
||||
java.lang.String r10 = r0.toString() // Catch: java.lang.Throwable -> L19
|
||||
java.lang.String r1 = "toString(...)"
|
||||
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r10, r1) // Catch: java.lang.Throwable -> L19
|
||||
int r1 = r0.length() // Catch: java.lang.Throwable -> L19
|
||||
if (r1 <= r4) goto Lba
|
||||
r9.trimStringBuilder() // Catch: java.lang.Throwable -> L19
|
||||
Lba:
|
||||
r0.setLength(r11) // Catch: java.lang.Throwable -> L19
|
||||
monitor-exit(r9)
|
||||
return r10
|
||||
Lbf:
|
||||
int r0 = r9.compactBytes() // Catch: java.lang.Throwable -> L19
|
||||
goto L2c
|
||||
Lc5:
|
||||
monitor-exit(r9) // Catch: java.lang.Throwable -> L19
|
||||
throw r10
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.io.LineReader.readLine(java.io.InputStream, java.nio.charset.Charset):java.lang.String");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.markers.KMappedMarker;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0017\n\u0000\n\u0002\u0010(\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\t\u0010\u0006\u001a\u00020\u0004H\u0096\u0002J\t\u0010\u0007\u001a\u00020\u0002H\u0096\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0002X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\b"}, d2 = {"kotlin/io/LinesSequence$iterator$1", "", "", "done", "", "nextValue", "hasNext", "next", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LinesSequence$iterator$1 implements Iterator<String>, KMappedMarker {
|
||||
private boolean done;
|
||||
private String nextValue;
|
||||
final /* synthetic */ LinesSequence this$0;
|
||||
|
||||
public LinesSequence$iterator$1(LinesSequence linesSequence) {
|
||||
this.this$0 = linesSequence;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
BufferedReader bufferedReader;
|
||||
if (this.nextValue == null && !this.done) {
|
||||
bufferedReader = this.this$0.reader;
|
||||
String readLine = bufferedReader.readLine();
|
||||
this.nextValue = readLine;
|
||||
if (readLine == null) {
|
||||
this.done = true;
|
||||
}
|
||||
}
|
||||
return this.nextValue != null;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public String next() {
|
||||
if (hasNext()) {
|
||||
String str = this.nextValue;
|
||||
this.nextValue = null;
|
||||
Intrinsics.checkNotNull(str);
|
||||
return str;
|
||||
}
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
}
|
||||
23
apk_decompiled/sources/kotlin/io/LinesSequence.java
Normal file
23
apk_decompiled/sources/kotlin/io/LinesSequence.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.util.Iterator;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.sequences.Sequence;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010(\n\u0000\b\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\u000f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00020\u0007H\u0096\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\b"}, d2 = {"Lkotlin/io/LinesSequence;", "Lkotlin/sequences/Sequence;", "", "reader", "Ljava/io/BufferedReader;", "(Ljava/io/BufferedReader;)V", "iterator", "", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
final class LinesSequence implements Sequence<String> {
|
||||
private final BufferedReader reader;
|
||||
|
||||
public LinesSequence(BufferedReader reader) {
|
||||
Intrinsics.checkNotNullParameter(reader, "reader");
|
||||
this.reader = reader;
|
||||
}
|
||||
|
||||
@Override // kotlin.sequences.Sequence
|
||||
public Iterator<String> iterator() {
|
||||
return new LinesSequence$iterator$1(this);
|
||||
}
|
||||
}
|
||||
20
apk_decompiled/sources/kotlin/io/NoSuchFileException.java
Normal file
20
apk_decompiled/sources/kotlin/io/NoSuchFileException.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.File;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\u0002\u0010\u0007¨\u0006\b"}, d2 = {"Lkotlin/io/NoSuchFileException;", "Lkotlin/io/FileSystemException;", "file", "Ljava/io/File;", "other", "reason", "", "(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class NoSuchFileException extends FileSystemException {
|
||||
public /* synthetic */ NoSuchFileException(File file, File file2, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(file, (i & 2) != 0 ? null : file2, (i & 4) != 0 ? null : str);
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public NoSuchFileException(File file, File file2, String str) {
|
||||
super(file, file2, str);
|
||||
Intrinsics.checkNotNullParameter(file, "file");
|
||||
}
|
||||
}
|
||||
41
apk_decompiled/sources/kotlin/io/OnErrorAction.java
Normal file
41
apk_decompiled/sources/kotlin/io/OnErrorAction.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package kotlin.io;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0004\b\u0086\u0081\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004¨\u0006\u0005"}, d2 = {"Lkotlin/io/OnErrorAction;", "", "(Ljava/lang/String;I)V", "SKIP", "TERMINATE", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class OnErrorAction {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ OnErrorAction[] $VALUES;
|
||||
public static final OnErrorAction SKIP = new OnErrorAction("SKIP", 0);
|
||||
public static final OnErrorAction TERMINATE = new OnErrorAction("TERMINATE", 1);
|
||||
|
||||
private static final /* synthetic */ OnErrorAction[] $values() {
|
||||
return new OnErrorAction[]{SKIP, TERMINATE};
|
||||
}
|
||||
|
||||
static {
|
||||
OnErrorAction[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private OnErrorAction(String str, int i) {
|
||||
}
|
||||
|
||||
public static EnumEntries<OnErrorAction> getEntries() {
|
||||
return $ENTRIES;
|
||||
}
|
||||
|
||||
public static OnErrorAction valueOf(String str) {
|
||||
return (OnErrorAction) Enum.valueOf(OnErrorAction.class, str);
|
||||
}
|
||||
|
||||
public static OnErrorAction[] values() {
|
||||
return (OnErrorAction[]) $VALUES.clone();
|
||||
}
|
||||
}
|
||||
11
apk_decompiled/sources/kotlin/io/ReadAfterEOFException.java
Normal file
11
apk_decompiled/sources/kotlin/io/ReadAfterEOFException.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package kotlin.io;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0000\u0018\u00002\u00060\u0001j\u0002`\u0002B\u000f\u0012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004¢\u0006\u0002\u0010\u0005¨\u0006\u0006"}, d2 = {"Lkotlin/io/ReadAfterEOFException;", "Ljava/lang/RuntimeException;", "Lkotlin/RuntimeException;", "message", "", "(Ljava/lang/String;)V", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ReadAfterEOFException extends RuntimeException {
|
||||
public ReadAfterEOFException(String str) {
|
||||
super(str);
|
||||
}
|
||||
}
|
||||
10
apk_decompiled/sources/kotlin/io/SerializableKt.java
Normal file
10
apk_decompiled/sources/kotlin/io/SerializableKt.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package kotlin.io;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000*\f\b\u0000\u0010\u0000\"\u00020\u00012\u00020\u0001¨\u0006\u0002"}, d2 = {"Serializable", "Ljava/io/Serializable;", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SerializableKt {
|
||||
public static /* synthetic */ void Serializable$annotations() {
|
||||
}
|
||||
}
|
||||
15
apk_decompiled/sources/kotlin/io/TerminateException.java
Normal file
15
apk_decompiled/sources/kotlin/io/TerminateException.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.File;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004¨\u0006\u0005"}, d2 = {"Lkotlin/io/TerminateException;", "Lkotlin/io/FileSystemException;", "file", "Ljava/io/File;", "(Ljava/io/File;)V", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
final class TerminateException extends FileSystemException {
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public TerminateException(File file) {
|
||||
super(file, null, null, 6, null);
|
||||
Intrinsics.checkNotNullParameter(file, "file");
|
||||
}
|
||||
}
|
||||
201
apk_decompiled/sources/kotlin/io/TextStreamsKt.java
Normal file
201
apk_decompiled/sources/kotlin/io/TextStreamsKt.java
Normal file
@@ -0,0 +1,201 @@
|
||||
package kotlin.io;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.internal.InlineOnly;
|
||||
import kotlin.internal.PlatformImplementationsKt;
|
||||
import kotlin.jvm.JvmName;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.InlineMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.sequences.Sequence;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
import kotlin.text.Charsets;
|
||||
|
||||
@Metadata(d1 = {"\u0000X\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\u0017\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\b\u001a\u0017\u0010\u0000\u001a\u00020\u0005*\u00020\u00062\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\b\u001a\u001c\u0010\u0007\u001a\u00020\b*\u00020\u00022\u0006\u0010\t\u001a\u00020\u00062\b\b\u0002\u0010\u0003\u001a\u00020\u0004\u001a\u001e\u0010\n\u001a\u00020\u000b*\u00020\u00022\u0012\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u000b0\r\u001a\u0010\u0010\u000f\u001a\b\u0012\u0004\u0012\u00020\u000e0\u0010*\u00020\u0001\u001a\n\u0010\u0011\u001a\u00020\u0012*\u00020\u0013\u001a\u0010\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u000e0\u0015*\u00020\u0002\u001a\n\u0010\u0016\u001a\u00020\u000e*\u00020\u0002\u001a\u0017\u0010\u0016\u001a\u00020\u000e*\u00020\u00132\b\b\u0002\u0010\u0017\u001a\u00020\u0018H\u0087\b\u001a\r\u0010\u0019\u001a\u00020\u001a*\u00020\u000eH\u0087\b\u001a5\u0010\u001b\u001a\u0002H\u001c\"\u0004\b\u0000\u0010\u001c*\u00020\u00022\u0018\u0010\u001d\u001a\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u000e0\u0010\u0012\u0004\u0012\u0002H\u001c0\rH\u0086\bø\u0001\u0000¢\u0006\u0002\u0010\u001e\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006\u001f"}, d2 = {"buffered", "Ljava/io/BufferedReader;", "Ljava/io/Reader;", "bufferSize", "", "Ljava/io/BufferedWriter;", "Ljava/io/Writer;", "copyTo", "", "out", "forEachLine", "", "action", "Lkotlin/Function1;", "", "lineSequence", "Lkotlin/sequences/Sequence;", "readBytes", "", "Ljava/net/URL;", "readLines", "", "readText", "charset", "Ljava/nio/charset/Charset;", "reader", "Ljava/io/StringReader;", "useLines", "T", "block", "(Ljava/io/Reader;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
@JvmName(name = "TextStreamsKt")
|
||||
@SourceDebugExtension({"SMAP\nReadWrite.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ReadWrite.kt\nkotlin/io/TextStreamsKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Sequences.kt\nkotlin/sequences/SequencesKt___SequencesKt\n*L\n1#1,151:1\n52#1:152\n1#2:153\n1#2:156\n1313#3,2:154\n*S KotlinDebug\n*F\n+ 1 ReadWrite.kt\nkotlin/io/TextStreamsKt\n*L\n33#1:152\n33#1:153\n33#1:154,2\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class TextStreamsKt {
|
||||
@InlineOnly
|
||||
private static final BufferedReader buffered(Reader reader, int i) {
|
||||
Intrinsics.checkNotNullParameter(reader, "<this>");
|
||||
return reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader, i);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BufferedReader buffered$default(Reader reader, int i, int i4, Object obj) {
|
||||
if ((i4 & 1) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(reader, "<this>");
|
||||
return reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader, i);
|
||||
}
|
||||
|
||||
public static final long copyTo(Reader reader, Writer out, int i) {
|
||||
Intrinsics.checkNotNullParameter(reader, "<this>");
|
||||
Intrinsics.checkNotNullParameter(out, "out");
|
||||
char[] cArr = new char[i];
|
||||
int read = reader.read(cArr);
|
||||
long j4 = 0;
|
||||
while (read >= 0) {
|
||||
out.write(cArr, 0, read);
|
||||
j4 += read;
|
||||
read = reader.read(cArr);
|
||||
}
|
||||
return j4;
|
||||
}
|
||||
|
||||
public static /* synthetic */ long copyTo$default(Reader reader, Writer writer, int i, int i4, Object obj) {
|
||||
if ((i4 & 2) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
return copyTo(reader, writer, i);
|
||||
}
|
||||
|
||||
public static final void forEachLine(Reader reader, Function1<? super String, Unit> action) {
|
||||
Intrinsics.checkNotNullParameter(reader, "<this>");
|
||||
Intrinsics.checkNotNullParameter(action, "action");
|
||||
BufferedReader bufferedReader = reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader, 8192);
|
||||
try {
|
||||
Iterator<String> it = lineSequence(bufferedReader).iterator();
|
||||
while (it.hasNext()) {
|
||||
action.invoke(it.next());
|
||||
}
|
||||
Unit unit = Unit.INSTANCE;
|
||||
CloseableKt.closeFinally(bufferedReader, null);
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
public static final Sequence<String> lineSequence(BufferedReader bufferedReader) {
|
||||
Intrinsics.checkNotNullParameter(bufferedReader, "<this>");
|
||||
return SequencesKt.constrainOnce(new LinesSequence(bufferedReader));
|
||||
}
|
||||
|
||||
public static final byte[] readBytes(URL url) {
|
||||
Intrinsics.checkNotNullParameter(url, "<this>");
|
||||
InputStream openStream = url.openStream();
|
||||
try {
|
||||
Intrinsics.checkNotNull(openStream);
|
||||
byte[] readBytes = ByteStreamsKt.readBytes(openStream);
|
||||
CloseableKt.closeFinally(openStream, null);
|
||||
return readBytes;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
public static final List<String> readLines(Reader reader) {
|
||||
Intrinsics.checkNotNullParameter(reader, "<this>");
|
||||
final ArrayList arrayList = new ArrayList();
|
||||
forEachLine(reader, new Function1<String, Unit>() { // from class: kotlin.io.TextStreamsKt$readLines$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(String str) {
|
||||
invoke2(str);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(String it) {
|
||||
Intrinsics.checkNotNullParameter(it, "it");
|
||||
arrayList.add(it);
|
||||
}
|
||||
});
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public static final String readText(Reader reader) {
|
||||
Intrinsics.checkNotNullParameter(reader, "<this>");
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
copyTo$default(reader, stringWriter, 0, 2, null);
|
||||
String stringWriter2 = stringWriter.toString();
|
||||
Intrinsics.checkNotNullExpressionValue(stringWriter2, "toString(...)");
|
||||
return stringWriter2;
|
||||
}
|
||||
|
||||
public static /* synthetic */ String readText$default(URL url, Charset charset, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
charset = Charsets.UTF_8;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(url, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new String(readBytes(url), charset);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final StringReader reader(String str) {
|
||||
Intrinsics.checkNotNullParameter(str, "<this>");
|
||||
return new StringReader(str);
|
||||
}
|
||||
|
||||
public static final <T> T useLines(Reader reader, Function1<? super Sequence<String>, ? extends T> block) {
|
||||
Intrinsics.checkNotNullParameter(reader, "<this>");
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
BufferedReader bufferedReader = reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader, 8192);
|
||||
try {
|
||||
T invoke = block.invoke(lineSequence(bufferedReader));
|
||||
InlineMarker.finallyStart(1);
|
||||
if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) {
|
||||
CloseableKt.closeFinally(bufferedReader, null);
|
||||
} else {
|
||||
bufferedReader.close();
|
||||
}
|
||||
InlineMarker.finallyEnd(1);
|
||||
return invoke;
|
||||
} catch (Throwable th) {
|
||||
try {
|
||||
throw th;
|
||||
} catch (Throwable th2) {
|
||||
InlineMarker.finallyStart(1);
|
||||
if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) {
|
||||
CloseableKt.closeFinally(bufferedReader, th);
|
||||
} else {
|
||||
try {
|
||||
bufferedReader.close();
|
||||
} catch (Throwable unused) {
|
||||
}
|
||||
}
|
||||
InlineMarker.finallyEnd(1);
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final BufferedWriter buffered(Writer writer, int i) {
|
||||
Intrinsics.checkNotNullParameter(writer, "<this>");
|
||||
return writer instanceof BufferedWriter ? (BufferedWriter) writer : new BufferedWriter(writer, i);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BufferedWriter buffered$default(Writer writer, int i, int i4, Object obj) {
|
||||
if ((i4 & 1) != 0) {
|
||||
i = 8192;
|
||||
}
|
||||
Intrinsics.checkNotNullParameter(writer, "<this>");
|
||||
return writer instanceof BufferedWriter ? (BufferedWriter) writer : new BufferedWriter(writer, i);
|
||||
}
|
||||
|
||||
@InlineOnly
|
||||
private static final String readText(URL url, Charset charset) {
|
||||
Intrinsics.checkNotNullParameter(url, "<this>");
|
||||
Intrinsics.checkNotNullParameter(charset, "charset");
|
||||
return new String(readBytes(url), charset);
|
||||
}
|
||||
}
|
||||
551
apk_decompiled/sources/kotlin/io/encoding/Base64.java
Normal file
551
apk_decompiled/sources/kotlin/io/encoding/Base64.java
Normal file
@@ -0,0 +1,551 @@
|
||||
package kotlin.io.encoding;
|
||||
|
||||
import C.w;
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import java.nio.charset.Charset;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.UByte;
|
||||
import kotlin.collections.AbstractList;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.text.CharsKt;
|
||||
import kotlin.text.Charsets;
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@SinceKotlin(version = "1.8")
|
||||
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0012\n\u0002\b\u0002\n\u0002\u0010\r\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0012\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\n\b\u0017\u0018\u0000 22\u00020\u0001:\u00012B\u0017\b\u0002\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003¢\u0006\u0002\u0010\u0005J\u0015\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\fH\u0000¢\u0006\u0002\b\rJ%\u0010\u000e\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0000¢\u0006\u0002\b\u0013J \u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u00112\u0006\u0010\u0017\u001a\u00020\u00112\u0006\u0010\u0018\u001a\u00020\u0011H\u0002J%\u0010\u0019\u001a\u00020\u00152\u0006\u0010\u001a\u001a\u00020\u00112\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0000¢\u0006\u0002\b\u001bJ\"\u0010\u001c\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\f2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u0011J\"\u0010\u001c\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\u000f2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u0011J0\u0010\u001d\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u001e\u001a\u00020\f2\u0006\u0010\u0017\u001a\u00020\u00112\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0002J4\u0010\u001f\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u001e\u001a\u00020\f2\b\b\u0002\u0010\u0017\u001a\u00020\u00112\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u0011J4\u0010\u001f\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\u000f2\u0006\u0010\u001e\u001a\u00020\f2\b\b\u0002\u0010\u0017\u001a\u00020\u00112\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u0011J \u0010 \u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0002J\"\u0010!\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u0011J4\u0010\"\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u001e\u001a\u00020\f2\b\b\u0002\u0010\u0017\u001a\u00020\u00112\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u0011J5\u0010#\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u001e\u001a\u00020\f2\u0006\u0010\u0017\u001a\u00020\u00112\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0000¢\u0006\u0002\b$J\u0010\u0010%\u001a\u00020\u00112\u0006\u0010\u001a\u001a\u00020\u0011H\u0002J=\u0010&\u001a\u0002H'\"\f\b\u0000\u0010'*\u00060(j\u0002`)2\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u001e\u001a\u0002H'2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u0011¢\u0006\u0002\u0010*J\"\u0010+\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\f2\b\b\u0002\u0010\u0010\u001a\u00020\u00112\b\b\u0002\u0010\u0012\u001a\u00020\u0011J%\u0010,\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0000¢\u0006\u0002\b-J(\u0010.\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010/\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u00112\u0006\u00100\u001a\u00020\u0011H\u0002J \u00101\u001a\u00020\u00112\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u0011H\u0002R\u0014\u0010\u0004\u001a\u00020\u0003X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u0014\u0010\u0002\u001a\u00020\u0003X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\u0007¨\u00063"}, d2 = {"Lkotlin/io/encoding/Base64;", "", "isUrlSafe", "", "isMimeScheme", "(ZZ)V", "isMimeScheme$kotlin_stdlib", "()Z", "isUrlSafe$kotlin_stdlib", "bytesToStringImpl", "", "source", "", "bytesToStringImpl$kotlin_stdlib", "charsToBytesImpl", "", "startIndex", "", "endIndex", "charsToBytesImpl$kotlin_stdlib", "checkDestinationBounds", "", "destinationSize", "destinationOffset", "capacityNeeded", "checkSourceBounds", "sourceSize", "checkSourceBounds$kotlin_stdlib", "decode", "decodeImpl", FirebaseAnalytics.Param.DESTINATION, "decodeIntoByteArray", "decodeSize", "encode", "encodeIntoByteArray", "encodeIntoByteArrayImpl", "encodeIntoByteArrayImpl$kotlin_stdlib", "encodeSize", "encodeToAppendable", "A", "Ljava/lang/Appendable;", "Lkotlin/text/Appendable;", "([BLjava/lang/Appendable;II)Ljava/lang/Appendable;", "encodeToByteArray", "encodeToByteArrayImpl", "encodeToByteArrayImpl$kotlin_stdlib", "handlePaddingSymbol", "padIndex", "byteStart", "skipIllegalSymbolsIfMime", "Default", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public class Base64 {
|
||||
private static final int bitsPerByte = 8;
|
||||
private static final int bitsPerSymbol = 6;
|
||||
public static final int bytesPerGroup = 3;
|
||||
private static final int mimeGroupsPerLine = 19;
|
||||
public static final int mimeLineLength = 76;
|
||||
public static final byte padSymbol = 61;
|
||||
public static final int symbolsPerGroup = 4;
|
||||
private final boolean isMimeScheme;
|
||||
private final boolean isUrlSafe;
|
||||
|
||||
/* renamed from: Default, reason: from kotlin metadata */
|
||||
public static final Companion INSTANCE = new Companion(null);
|
||||
private static final byte[] mimeLineSeparatorSymbols = {13, 10};
|
||||
private static final Base64 UrlSafe = new Base64(true, false);
|
||||
private static final Base64 Mime = new Base64(false, true);
|
||||
|
||||
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u0012\n\u0002\b\u0003\n\u0002\u0010\u0005\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u0001¢\u0006\b\n\u0000\u001a\u0004\b\u0004\u0010\u0005R\u0011\u0010\u0006\u001a\u00020\u0001¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\u0005R\u000e\u0010\b\u001a\u00020\tX\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\tX\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\tX\u0080T¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\tX\u0082T¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\tX\u0080T¢\u0006\u0002\n\u0000R\u0014\u0010\u000e\u001a\u00020\u000fX\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u000e\u0010\u0012\u001a\u00020\u0013X\u0080T¢\u0006\u0002\n\u0000R\u000e\u0010\u0014\u001a\u00020\tX\u0080T¢\u0006\u0002\n\u0000¨\u0006\u0015"}, d2 = {"Lkotlin/io/encoding/Base64$Default;", "Lkotlin/io/encoding/Base64;", "()V", "Mime", "getMime", "()Lkotlin/io/encoding/Base64;", "UrlSafe", "getUrlSafe", "bitsPerByte", "", "bitsPerSymbol", "bytesPerGroup", "mimeGroupsPerLine", "mimeLineLength", "mimeLineSeparatorSymbols", "", "getMimeLineSeparatorSymbols$kotlin_stdlib", "()[B", "padSymbol", "", "symbolsPerGroup", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* renamed from: kotlin.io.encoding.Base64$Default, reason: from kotlin metadata */
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion extends Base64 {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
public final Base64 getMime() {
|
||||
return Base64.Mime;
|
||||
}
|
||||
|
||||
public final byte[] getMimeLineSeparatorSymbols$kotlin_stdlib() {
|
||||
return Base64.mimeLineSeparatorSymbols;
|
||||
}
|
||||
|
||||
public final Base64 getUrlSafe() {
|
||||
return Base64.UrlSafe;
|
||||
}
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private Companion() {
|
||||
/*
|
||||
r2 = this;
|
||||
r0 = 0
|
||||
r1 = 0
|
||||
r2.<init>(r0, r0, r1)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.io.encoding.Base64.Companion.<init>():void");
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ Base64(boolean z3, boolean z4, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(z3, z4);
|
||||
}
|
||||
|
||||
private final void checkDestinationBounds(int destinationSize, int destinationOffset, int capacityNeeded) {
|
||||
if (destinationOffset < 0 || destinationOffset > destinationSize) {
|
||||
throw new IndexOutOfBoundsException(w.k("destination offset: ", destinationOffset, destinationSize, ", destination size: "));
|
||||
}
|
||||
int i = destinationOffset + capacityNeeded;
|
||||
if (i < 0 || i > destinationSize) {
|
||||
throw new IndexOutOfBoundsException("The destination array does not have enough capacity, destination offset: " + destinationOffset + ", destination size: " + destinationSize + ", capacity needed: " + capacityNeeded);
|
||||
}
|
||||
}
|
||||
|
||||
public static /* synthetic */ byte[] decode$default(Base64 base64, byte[] bArr, int i, int i4, int i5, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: decode");
|
||||
}
|
||||
if ((i5 & 2) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i5 & 4) != 0) {
|
||||
i4 = bArr.length;
|
||||
}
|
||||
return base64.decode(bArr, i, i4);
|
||||
}
|
||||
|
||||
private final int decodeImpl(byte[] source, byte[] destination, int destinationOffset, int startIndex, int endIndex) {
|
||||
int i;
|
||||
int i4;
|
||||
int[] access$getBase64UrlDecodeMap$p = this.isUrlSafe ? Base64Kt.access$getBase64UrlDecodeMap$p() : Base64Kt.access$getBase64DecodeMap$p();
|
||||
int i5 = -8;
|
||||
int i6 = destinationOffset;
|
||||
int i7 = -8;
|
||||
int i8 = 0;
|
||||
int i9 = startIndex;
|
||||
while (true) {
|
||||
if (i9 >= endIndex) {
|
||||
i = 8;
|
||||
break;
|
||||
}
|
||||
if (i7 != i5 || i9 + 3 >= endIndex) {
|
||||
i = 8;
|
||||
i4 = 1;
|
||||
} else {
|
||||
i = 8;
|
||||
int i10 = i9 + 4;
|
||||
i4 = 1;
|
||||
int i11 = (access$getBase64UrlDecodeMap$p[source[i9] & UByte.MAX_VALUE] << 18) | (access$getBase64UrlDecodeMap$p[source[i9 + 1] & UByte.MAX_VALUE] << 12) | (access$getBase64UrlDecodeMap$p[source[i9 + 2] & UByte.MAX_VALUE] << 6) | access$getBase64UrlDecodeMap$p[source[i9 + 3] & UByte.MAX_VALUE];
|
||||
if (i11 >= 0) {
|
||||
destination[i6] = (byte) (i11 >> 16);
|
||||
int i12 = i6 + 2;
|
||||
destination[i6 + 1] = (byte) (i11 >> 8);
|
||||
i6 += 3;
|
||||
destination[i12] = (byte) i11;
|
||||
i9 = i10;
|
||||
i5 = -8;
|
||||
}
|
||||
}
|
||||
int i13 = source[i9] & UByte.MAX_VALUE;
|
||||
int i14 = access$getBase64UrlDecodeMap$p[i13];
|
||||
if (i14 >= 0) {
|
||||
i9++;
|
||||
i8 = (i8 << 6) | i14;
|
||||
int i15 = i7 + 6;
|
||||
if (i15 >= 0) {
|
||||
destination[i6] = (byte) (i8 >>> i15);
|
||||
i8 &= (i4 << i15) - 1;
|
||||
i7 -= 2;
|
||||
i6++;
|
||||
} else {
|
||||
i7 = i15;
|
||||
}
|
||||
} else {
|
||||
if (i14 == -2) {
|
||||
i9 = handlePaddingSymbol(source, i9, endIndex, i7);
|
||||
break;
|
||||
}
|
||||
if (!this.isMimeScheme) {
|
||||
StringBuilder sb = new StringBuilder("Invalid symbol '");
|
||||
sb.append((char) i13);
|
||||
sb.append("'(");
|
||||
String num = Integer.toString(i13, CharsKt.checkRadix(i));
|
||||
Intrinsics.checkNotNullExpressionValue(num, "toString(...)");
|
||||
sb.append(num);
|
||||
sb.append(") at index ");
|
||||
sb.append(i9);
|
||||
throw new IllegalArgumentException(sb.toString());
|
||||
}
|
||||
i9++;
|
||||
}
|
||||
i5 = -8;
|
||||
}
|
||||
if (i7 == -2) {
|
||||
throw new IllegalArgumentException("The last unit of input does not have enough bits");
|
||||
}
|
||||
int skipIllegalSymbolsIfMime = skipIllegalSymbolsIfMime(source, i9, endIndex);
|
||||
if (skipIllegalSymbolsIfMime >= endIndex) {
|
||||
return i6 - destinationOffset;
|
||||
}
|
||||
int i16 = source[skipIllegalSymbolsIfMime] & UByte.MAX_VALUE;
|
||||
StringBuilder sb2 = new StringBuilder("Symbol '");
|
||||
sb2.append((char) i16);
|
||||
sb2.append("'(");
|
||||
String num2 = Integer.toString(i16, CharsKt.checkRadix(i));
|
||||
Intrinsics.checkNotNullExpressionValue(num2, "toString(...)");
|
||||
sb2.append(num2);
|
||||
sb2.append(") at index ");
|
||||
throw new IllegalArgumentException(a.m(sb2, skipIllegalSymbolsIfMime - 1, " is prohibited after the pad character"));
|
||||
}
|
||||
|
||||
public static /* synthetic */ int decodeIntoByteArray$default(Base64 base64, byte[] bArr, byte[] bArr2, int i, int i4, int i5, int i6, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: decodeIntoByteArray");
|
||||
}
|
||||
if ((i6 & 4) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i6 & 8) != 0) {
|
||||
i4 = 0;
|
||||
}
|
||||
if ((i6 & 16) != 0) {
|
||||
i5 = bArr.length;
|
||||
}
|
||||
return base64.decodeIntoByteArray(bArr, bArr2, i, i4, i5);
|
||||
}
|
||||
|
||||
private final int decodeSize(byte[] source, int startIndex, int endIndex) {
|
||||
int i = endIndex - startIndex;
|
||||
if (i == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (i == 1) {
|
||||
throw new IllegalArgumentException(w.k("Input should have at list 2 symbols for Base64 decoding, startIndex: ", startIndex, endIndex, ", endIndex: "));
|
||||
}
|
||||
if (this.isMimeScheme) {
|
||||
while (true) {
|
||||
if (startIndex >= endIndex) {
|
||||
break;
|
||||
}
|
||||
int i4 = Base64Kt.access$getBase64DecodeMap$p()[source[startIndex] & UByte.MAX_VALUE];
|
||||
if (i4 < 0) {
|
||||
if (i4 == -2) {
|
||||
i -= endIndex - startIndex;
|
||||
break;
|
||||
}
|
||||
i--;
|
||||
}
|
||||
startIndex++;
|
||||
}
|
||||
} else if (source[endIndex - 1] == 61) {
|
||||
i = source[endIndex + (-2)] == 61 ? i - 2 : i - 1;
|
||||
}
|
||||
return (int) ((i * 6) / 8);
|
||||
}
|
||||
|
||||
public static /* synthetic */ String encode$default(Base64 base64, byte[] bArr, int i, int i4, int i5, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: encode");
|
||||
}
|
||||
if ((i5 & 2) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i5 & 4) != 0) {
|
||||
i4 = bArr.length;
|
||||
}
|
||||
return base64.encode(bArr, i, i4);
|
||||
}
|
||||
|
||||
public static /* synthetic */ int encodeIntoByteArray$default(Base64 base64, byte[] bArr, byte[] bArr2, int i, int i4, int i5, int i6, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: encodeIntoByteArray");
|
||||
}
|
||||
if ((i6 & 4) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i6 & 8) != 0) {
|
||||
i4 = 0;
|
||||
}
|
||||
if ((i6 & 16) != 0) {
|
||||
i5 = bArr.length;
|
||||
}
|
||||
return base64.encodeIntoByteArray(bArr, bArr2, i, i4, i5);
|
||||
}
|
||||
|
||||
private final int encodeSize(int sourceSize) {
|
||||
int i = (sourceSize + 2) / 3;
|
||||
int i4 = ((this.isMimeScheme ? (i - 1) / 19 : 0) * 2) + (i * 4);
|
||||
if (i4 >= 0) {
|
||||
return i4;
|
||||
}
|
||||
throw new IllegalArgumentException("Input is too big");
|
||||
}
|
||||
|
||||
public static /* synthetic */ Appendable encodeToAppendable$default(Base64 base64, byte[] bArr, Appendable appendable, int i, int i4, int i5, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: encodeToAppendable");
|
||||
}
|
||||
if ((i5 & 4) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i5 & 8) != 0) {
|
||||
i4 = bArr.length;
|
||||
}
|
||||
return base64.encodeToAppendable(bArr, appendable, i, i4);
|
||||
}
|
||||
|
||||
public static /* synthetic */ byte[] encodeToByteArray$default(Base64 base64, byte[] bArr, int i, int i4, int i5, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: encodeToByteArray");
|
||||
}
|
||||
if ((i5 & 2) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i5 & 4) != 0) {
|
||||
i4 = bArr.length;
|
||||
}
|
||||
return base64.encodeToByteArray(bArr, i, i4);
|
||||
}
|
||||
|
||||
private final int handlePaddingSymbol(byte[] source, int padIndex, int endIndex, int byteStart) {
|
||||
if (byteStart == -8) {
|
||||
throw new IllegalArgumentException(a.l(padIndex, "Redundant pad character at index "));
|
||||
}
|
||||
if (byteStart == -6) {
|
||||
return padIndex + 1;
|
||||
}
|
||||
if (byteStart != -4) {
|
||||
if (byteStart == -2) {
|
||||
return padIndex + 1;
|
||||
}
|
||||
throw new IllegalStateException("Unreachable");
|
||||
}
|
||||
int skipIllegalSymbolsIfMime = skipIllegalSymbolsIfMime(source, padIndex + 1, endIndex);
|
||||
if (skipIllegalSymbolsIfMime == endIndex || source[skipIllegalSymbolsIfMime] != 61) {
|
||||
throw new IllegalArgumentException(a.l(skipIllegalSymbolsIfMime, "Missing one pad character at index "));
|
||||
}
|
||||
return skipIllegalSymbolsIfMime + 1;
|
||||
}
|
||||
|
||||
private final int skipIllegalSymbolsIfMime(byte[] source, int startIndex, int endIndex) {
|
||||
if (!this.isMimeScheme) {
|
||||
return startIndex;
|
||||
}
|
||||
while (startIndex < endIndex) {
|
||||
if (Base64Kt.access$getBase64DecodeMap$p()[source[startIndex] & UByte.MAX_VALUE] != -1) {
|
||||
break;
|
||||
}
|
||||
startIndex++;
|
||||
}
|
||||
return startIndex;
|
||||
}
|
||||
|
||||
public final String bytesToStringImpl$kotlin_stdlib(byte[] source) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
StringBuilder sb = new StringBuilder(source.length);
|
||||
for (byte b4 : source) {
|
||||
sb.append((char) b4);
|
||||
}
|
||||
String sb2 = sb.toString();
|
||||
Intrinsics.checkNotNullExpressionValue(sb2, "toString(...)");
|
||||
return sb2;
|
||||
}
|
||||
|
||||
public final byte[] charsToBytesImpl$kotlin_stdlib(CharSequence source, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
checkSourceBounds$kotlin_stdlib(source.length(), startIndex, endIndex);
|
||||
byte[] bArr = new byte[endIndex - startIndex];
|
||||
int i = 0;
|
||||
while (startIndex < endIndex) {
|
||||
char charAt = source.charAt(startIndex);
|
||||
if (charAt <= 255) {
|
||||
bArr[i] = (byte) charAt;
|
||||
i++;
|
||||
} else {
|
||||
bArr[i] = 63;
|
||||
i++;
|
||||
}
|
||||
startIndex++;
|
||||
}
|
||||
return bArr;
|
||||
}
|
||||
|
||||
public final void checkSourceBounds$kotlin_stdlib(int sourceSize, int startIndex, int endIndex) {
|
||||
AbstractList.INSTANCE.checkBoundsIndexes$kotlin_stdlib(startIndex, endIndex, sourceSize);
|
||||
}
|
||||
|
||||
public final byte[] decode(byte[] source, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
checkSourceBounds$kotlin_stdlib(source.length, startIndex, endIndex);
|
||||
int decodeSize = decodeSize(source, startIndex, endIndex);
|
||||
byte[] bArr = new byte[decodeSize];
|
||||
if (decodeImpl(source, bArr, 0, startIndex, endIndex) == decodeSize) {
|
||||
return bArr;
|
||||
}
|
||||
throw new IllegalStateException("Check failed.");
|
||||
}
|
||||
|
||||
public final int decodeIntoByteArray(byte[] source, byte[] destination, int destinationOffset, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
Intrinsics.checkNotNullParameter(destination, "destination");
|
||||
checkSourceBounds$kotlin_stdlib(source.length, startIndex, endIndex);
|
||||
checkDestinationBounds(destination.length, destinationOffset, decodeSize(source, startIndex, endIndex));
|
||||
return decodeImpl(source, destination, destinationOffset, startIndex, endIndex);
|
||||
}
|
||||
|
||||
public final String encode(byte[] source, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
return new String(encodeToByteArrayImpl$kotlin_stdlib(source, startIndex, endIndex), Charsets.ISO_8859_1);
|
||||
}
|
||||
|
||||
public final int encodeIntoByteArray(byte[] source, byte[] destination, int destinationOffset, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
Intrinsics.checkNotNullParameter(destination, "destination");
|
||||
return encodeIntoByteArrayImpl$kotlin_stdlib(source, destination, destinationOffset, startIndex, endIndex);
|
||||
}
|
||||
|
||||
public final int encodeIntoByteArrayImpl$kotlin_stdlib(byte[] source, byte[] destination, int destinationOffset, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
Intrinsics.checkNotNullParameter(destination, "destination");
|
||||
checkSourceBounds$kotlin_stdlib(source.length, startIndex, endIndex);
|
||||
checkDestinationBounds(destination.length, destinationOffset, encodeSize(endIndex - startIndex));
|
||||
byte[] access$getBase64UrlEncodeMap$p = this.isUrlSafe ? Base64Kt.access$getBase64UrlEncodeMap$p() : Base64Kt.access$getBase64EncodeMap$p();
|
||||
int i = this.isMimeScheme ? 19 : Integer.MAX_VALUE;
|
||||
int i4 = destinationOffset;
|
||||
while (startIndex + 2 < endIndex) {
|
||||
int min = Math.min((endIndex - startIndex) / 3, i);
|
||||
for (int i5 = 0; i5 < min; i5++) {
|
||||
int i6 = source[startIndex] & UByte.MAX_VALUE;
|
||||
int i7 = startIndex + 2;
|
||||
int i8 = source[startIndex + 1] & UByte.MAX_VALUE;
|
||||
startIndex += 3;
|
||||
int i9 = (i8 << 8) | (i6 << 16) | (source[i7] & UByte.MAX_VALUE);
|
||||
destination[i4] = access$getBase64UrlEncodeMap$p[i9 >>> 18];
|
||||
destination[i4 + 1] = access$getBase64UrlEncodeMap$p[(i9 >>> 12) & 63];
|
||||
int i10 = i4 + 3;
|
||||
destination[i4 + 2] = access$getBase64UrlEncodeMap$p[(i9 >>> 6) & 63];
|
||||
i4 += 4;
|
||||
destination[i10] = access$getBase64UrlEncodeMap$p[i9 & 63];
|
||||
}
|
||||
if (min == i && startIndex != endIndex) {
|
||||
int i11 = i4 + 1;
|
||||
byte[] bArr = mimeLineSeparatorSymbols;
|
||||
destination[i4] = bArr[0];
|
||||
i4 += 2;
|
||||
destination[i11] = bArr[1];
|
||||
}
|
||||
}
|
||||
int i12 = endIndex - startIndex;
|
||||
if (i12 == 1) {
|
||||
int i13 = (source[startIndex] & UByte.MAX_VALUE) << 4;
|
||||
destination[i4] = access$getBase64UrlEncodeMap$p[i13 >>> 6];
|
||||
destination[i4 + 1] = access$getBase64UrlEncodeMap$p[i13 & 63];
|
||||
int i14 = i4 + 3;
|
||||
destination[i4 + 2] = padSymbol;
|
||||
i4 += 4;
|
||||
destination[i14] = padSymbol;
|
||||
startIndex++;
|
||||
} else if (i12 == 2) {
|
||||
int i15 = startIndex + 1;
|
||||
int i16 = source[startIndex] & UByte.MAX_VALUE;
|
||||
startIndex += 2;
|
||||
int i17 = ((source[i15] & UByte.MAX_VALUE) << 2) | (i16 << 10);
|
||||
destination[i4] = access$getBase64UrlEncodeMap$p[i17 >>> 12];
|
||||
destination[i4 + 1] = access$getBase64UrlEncodeMap$p[(i17 >>> 6) & 63];
|
||||
int i18 = i4 + 3;
|
||||
destination[i4 + 2] = access$getBase64UrlEncodeMap$p[i17 & 63];
|
||||
i4 += 4;
|
||||
destination[i18] = padSymbol;
|
||||
}
|
||||
if (startIndex == endIndex) {
|
||||
return i4 - destinationOffset;
|
||||
}
|
||||
throw new IllegalStateException("Check failed.");
|
||||
}
|
||||
|
||||
public final <A extends Appendable> A encodeToAppendable(byte[] source, A destination, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
Intrinsics.checkNotNullParameter(destination, "destination");
|
||||
destination.append(new String(encodeToByteArrayImpl$kotlin_stdlib(source, startIndex, endIndex), Charsets.ISO_8859_1));
|
||||
return destination;
|
||||
}
|
||||
|
||||
public final byte[] encodeToByteArray(byte[] source, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
return encodeToByteArrayImpl$kotlin_stdlib(source, startIndex, endIndex);
|
||||
}
|
||||
|
||||
public final byte[] encodeToByteArrayImpl$kotlin_stdlib(byte[] source, int startIndex, int endIndex) {
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
checkSourceBounds$kotlin_stdlib(source.length, startIndex, endIndex);
|
||||
byte[] bArr = new byte[encodeSize(endIndex - startIndex)];
|
||||
encodeIntoByteArrayImpl$kotlin_stdlib(source, bArr, 0, startIndex, endIndex);
|
||||
return bArr;
|
||||
}
|
||||
|
||||
/* renamed from: isMimeScheme$kotlin_stdlib, reason: from getter */
|
||||
public final boolean getIsMimeScheme() {
|
||||
return this.isMimeScheme;
|
||||
}
|
||||
|
||||
/* renamed from: isUrlSafe$kotlin_stdlib, reason: from getter */
|
||||
public final boolean getIsUrlSafe() {
|
||||
return this.isUrlSafe;
|
||||
}
|
||||
|
||||
private Base64(boolean z3, boolean z4) {
|
||||
this.isUrlSafe = z3;
|
||||
this.isMimeScheme = z4;
|
||||
if (z3 && z4) {
|
||||
throw new IllegalArgumentException("Failed requirement.");
|
||||
}
|
||||
}
|
||||
|
||||
public static /* synthetic */ byte[] decode$default(Base64 base64, CharSequence charSequence, int i, int i4, int i5, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: decode");
|
||||
}
|
||||
if ((i5 & 2) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i5 & 4) != 0) {
|
||||
i4 = charSequence.length();
|
||||
}
|
||||
return base64.decode(charSequence, i, i4);
|
||||
}
|
||||
|
||||
public static /* synthetic */ int decodeIntoByteArray$default(Base64 base64, CharSequence charSequence, byte[] bArr, int i, int i4, int i5, int i6, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: decodeIntoByteArray");
|
||||
}
|
||||
if ((i6 & 4) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i6 & 8) != 0) {
|
||||
i4 = 0;
|
||||
}
|
||||
if ((i6 & 16) != 0) {
|
||||
i5 = charSequence.length();
|
||||
}
|
||||
return base64.decodeIntoByteArray(charSequence, bArr, i, i4, i5);
|
||||
}
|
||||
|
||||
public final int decodeIntoByteArray(CharSequence source, byte[] destination, int destinationOffset, int startIndex, int endIndex) {
|
||||
byte[] charsToBytesImpl$kotlin_stdlib;
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
Intrinsics.checkNotNullParameter(destination, "destination");
|
||||
if (source instanceof String) {
|
||||
checkSourceBounds$kotlin_stdlib(((String) source).length(), startIndex, endIndex);
|
||||
String substring = ((String) source).substring(startIndex, endIndex);
|
||||
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
||||
Charset charset = Charsets.ISO_8859_1;
|
||||
Intrinsics.checkNotNull(substring, "null cannot be cast to non-null type java.lang.String");
|
||||
charsToBytesImpl$kotlin_stdlib = substring.getBytes(charset);
|
||||
Intrinsics.checkNotNullExpressionValue(charsToBytesImpl$kotlin_stdlib, "getBytes(...)");
|
||||
} else {
|
||||
charsToBytesImpl$kotlin_stdlib = charsToBytesImpl$kotlin_stdlib(source, startIndex, endIndex);
|
||||
}
|
||||
return decodeIntoByteArray$default(this, charsToBytesImpl$kotlin_stdlib, destination, destinationOffset, 0, 0, 24, (Object) null);
|
||||
}
|
||||
|
||||
public final byte[] decode(CharSequence source, int startIndex, int endIndex) {
|
||||
byte[] charsToBytesImpl$kotlin_stdlib;
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
if (source instanceof String) {
|
||||
checkSourceBounds$kotlin_stdlib(((String) source).length(), startIndex, endIndex);
|
||||
String substring = ((String) source).substring(startIndex, endIndex);
|
||||
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
||||
Charset charset = Charsets.ISO_8859_1;
|
||||
Intrinsics.checkNotNull(substring, "null cannot be cast to non-null type java.lang.String");
|
||||
charsToBytesImpl$kotlin_stdlib = substring.getBytes(charset);
|
||||
Intrinsics.checkNotNullExpressionValue(charsToBytesImpl$kotlin_stdlib, "getBytes(...)");
|
||||
} else {
|
||||
charsToBytesImpl$kotlin_stdlib = charsToBytesImpl$kotlin_stdlib(source, startIndex, endIndex);
|
||||
}
|
||||
return decode$default(this, charsToBytesImpl$kotlin_stdlib, 0, 0, 6, (Object) null);
|
||||
}
|
||||
}
|
||||
60
apk_decompiled/sources/kotlin/io/encoding/Base64JVMKt.java
Normal file
60
apk_decompiled/sources/kotlin/io/encoding/Base64JVMKt.java
Normal file
@@ -0,0 +1,60 @@
|
||||
package kotlin.io.encoding;
|
||||
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import java.nio.charset.Charset;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.internal.InlineOnly;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.text.Charsets;
|
||||
|
||||
@Metadata(d1 = {"\u0000 \n\u0000\n\u0002\u0010\u0012\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\r\n\u0000\n\u0002\u0010\b\n\u0002\b\u0006\n\u0002\u0010\u000e\n\u0000\u001a%\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u0006H\u0081\b\u001a5\u0010\b\u001a\u00020\u0006*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00012\u0006\u0010\t\u001a\u00020\u00012\u0006\u0010\n\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u0006H\u0081\b\u001a%\u0010\u000b\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00012\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u0006H\u0081\b\u001a%\u0010\f\u001a\u00020\r*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00012\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u0006H\u0081\b¨\u0006\u000e"}, d2 = {"platformCharsToBytes", "", "Lkotlin/io/encoding/Base64;", "source", "", "startIndex", "", "endIndex", "platformEncodeIntoByteArray", FirebaseAnalytics.Param.DESTINATION, "destinationOffset", "platformEncodeToByteArray", "platformEncodeToString", "", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Base64JVMKt {
|
||||
@ExperimentalEncodingApi
|
||||
@SinceKotlin(version = "1.8")
|
||||
@InlineOnly
|
||||
private static final byte[] platformCharsToBytes(Base64 base64, CharSequence source, int i, int i4) {
|
||||
Intrinsics.checkNotNullParameter(base64, "<this>");
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
if (!(source instanceof String)) {
|
||||
return base64.charsToBytesImpl$kotlin_stdlib(source, i, i4);
|
||||
}
|
||||
base64.checkSourceBounds$kotlin_stdlib(((String) source).length(), i, i4);
|
||||
String substring = ((String) source).substring(i, i4);
|
||||
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
||||
Charset charset = Charsets.ISO_8859_1;
|
||||
Intrinsics.checkNotNull(substring, "null cannot be cast to non-null type java.lang.String");
|
||||
byte[] bytes = substring.getBytes(charset);
|
||||
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
||||
return bytes;
|
||||
}
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@SinceKotlin(version = "1.8")
|
||||
@InlineOnly
|
||||
private static final int platformEncodeIntoByteArray(Base64 base64, byte[] source, byte[] destination, int i, int i4, int i5) {
|
||||
Intrinsics.checkNotNullParameter(base64, "<this>");
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
Intrinsics.checkNotNullParameter(destination, "destination");
|
||||
return base64.encodeIntoByteArrayImpl$kotlin_stdlib(source, destination, i, i4, i5);
|
||||
}
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@SinceKotlin(version = "1.8")
|
||||
@InlineOnly
|
||||
private static final byte[] platformEncodeToByteArray(Base64 base64, byte[] source, int i, int i4) {
|
||||
Intrinsics.checkNotNullParameter(base64, "<this>");
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
return base64.encodeToByteArrayImpl$kotlin_stdlib(source, i, i4);
|
||||
}
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@SinceKotlin(version = "1.8")
|
||||
@InlineOnly
|
||||
private static final String platformEncodeToString(Base64 base64, byte[] source, int i, int i4) {
|
||||
Intrinsics.checkNotNullParameter(base64, "<this>");
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
return new String(base64.encodeToByteArrayImpl$kotlin_stdlib(source, i, i4), Charsets.ISO_8859_1);
|
||||
}
|
||||
}
|
||||
79
apk_decompiled/sources/kotlin/io/encoding/Base64Kt.java
Normal file
79
apk_decompiled/sources/kotlin/io/encoding/Base64Kt.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package kotlin.io.encoding;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.collections.ArraysKt___ArraysJvmKt;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001e\n\u0000\n\u0002\u0010\u0015\n\u0002\b\u0003\n\u0002\u0010\u0012\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0000\u001a\u0010\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\fH\u0001\"\u0016\u0010\u0000\u001a\u00020\u00018\u0002X\u0083\u0004¢\u0006\b\n\u0000\u0012\u0004\b\u0002\u0010\u0003\"\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000\"\u0016\u0010\u0006\u001a\u00020\u00018\u0002X\u0083\u0004¢\u0006\b\n\u0000\u0012\u0004\b\u0007\u0010\u0003\"\u000e\u0010\b\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"base64DecodeMap", "", "getBase64DecodeMap$annotations", "()V", "base64EncodeMap", "", "base64UrlDecodeMap", "getBase64UrlDecodeMap$annotations", "base64UrlEncodeMap", "isInMimeAlphabet", "", "symbol", "", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nBase64.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Base64.kt\nkotlin/io/encoding/Base64Kt\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,643:1\n13384#2,3:644\n13384#2,3:647\n*S KotlinDebug\n*F\n+ 1 Base64.kt\nkotlin/io/encoding/Base64Kt\n*L\n580#1:644,3\n597#1:647,3\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Base64Kt {
|
||||
private static final int[] base64DecodeMap;
|
||||
private static final byte[] base64EncodeMap;
|
||||
private static final int[] base64UrlDecodeMap;
|
||||
private static final byte[] base64UrlEncodeMap;
|
||||
|
||||
static {
|
||||
byte[] bArr = {65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47};
|
||||
base64EncodeMap = bArr;
|
||||
int[] iArr = new int[256];
|
||||
ArraysKt___ArraysJvmKt.fill$default(iArr, -1, 0, 0, 6, (Object) null);
|
||||
iArr[61] = -2;
|
||||
int i = 0;
|
||||
int i4 = 0;
|
||||
int i5 = 0;
|
||||
while (i4 < 64) {
|
||||
iArr[bArr[i4]] = i5;
|
||||
i4++;
|
||||
i5++;
|
||||
}
|
||||
base64DecodeMap = iArr;
|
||||
byte[] bArr2 = {65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 95};
|
||||
base64UrlEncodeMap = bArr2;
|
||||
int[] iArr2 = new int[256];
|
||||
ArraysKt___ArraysJvmKt.fill$default(iArr2, -1, 0, 0, 6, (Object) null);
|
||||
iArr2[61] = -2;
|
||||
int i6 = 0;
|
||||
while (i < 64) {
|
||||
iArr2[bArr2[i]] = i6;
|
||||
i++;
|
||||
i6++;
|
||||
}
|
||||
base64UrlDecodeMap = iArr2;
|
||||
}
|
||||
|
||||
public static final /* synthetic */ int[] access$getBase64DecodeMap$p() {
|
||||
return base64DecodeMap;
|
||||
}
|
||||
|
||||
public static final /* synthetic */ byte[] access$getBase64EncodeMap$p() {
|
||||
return base64EncodeMap;
|
||||
}
|
||||
|
||||
public static final /* synthetic */ int[] access$getBase64UrlDecodeMap$p() {
|
||||
return base64UrlDecodeMap;
|
||||
}
|
||||
|
||||
public static final /* synthetic */ byte[] access$getBase64UrlEncodeMap$p() {
|
||||
return base64UrlEncodeMap;
|
||||
}
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
private static /* synthetic */ void getBase64DecodeMap$annotations() {
|
||||
}
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
private static /* synthetic */ void getBase64UrlDecodeMap$annotations() {
|
||||
}
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@SinceKotlin(version = "1.8")
|
||||
public static final boolean isInMimeAlphabet(int i) {
|
||||
if (i < 0) {
|
||||
return false;
|
||||
}
|
||||
int[] iArr = base64DecodeMap;
|
||||
return i < iArr.length && iArr[i] != -1;
|
||||
}
|
||||
}
|
||||
186
apk_decompiled/sources/kotlin/io/encoding/DecodeInputStream.java
Normal file
186
apk_decompiled/sources/kotlin/io/encoding/DecodeInputStream.java
Normal file
@@ -0,0 +1,186 @@
|
||||
package kotlin.io.encoding;
|
||||
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.UByte;
|
||||
import kotlin.collections.ArraysKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0012\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u000f\b\u0003\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\u0013\u001a\u00020\u0014H\u0016J \u0010\u0015\u001a\u00020\u00142\u0006\u0010\u0016\u001a\u00020\u00072\u0006\u0010\u0017\u001a\u00020\t2\u0006\u0010\u0018\u001a\u00020\tH\u0002J(\u0010\u0019\u001a\u00020\t2\u0006\u0010\u0016\u001a\u00020\u00072\u0006\u0010\u0017\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\t2\u0006\u0010\u001b\u001a\u00020\tH\u0002J\u0010\u0010\u001c\u001a\u00020\t2\u0006\u0010\u001b\u001a\u00020\tH\u0002J\b\u0010\u001d\u001a\u00020\tH\u0016J \u0010\u001d\u001a\u00020\t2\u0006\u0010\u001e\u001a\u00020\u00072\u0006\u0010\u001f\u001a\u00020\t2\u0006\u0010\u0018\u001a\u00020\tH\u0016J\b\u0010 \u001a\u00020\tH\u0002J\b\u0010!\u001a\u00020\u0014H\u0002J\b\u0010\"\u001a\u00020\u0014H\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u0014\u0010\n\u001a\u00020\t8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u000b\u0010\fR\u000e\u0010\r\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0001X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\u000fX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0010\u001a\u00020\u000fX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0011\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0012\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006#"}, d2 = {"Lkotlin/io/encoding/DecodeInputStream;", "Ljava/io/InputStream;", "input", "base64", "Lkotlin/io/encoding/Base64;", "(Ljava/io/InputStream;Lkotlin/io/encoding/Base64;)V", "byteBuffer", "", "byteBufferEndIndex", "", "byteBufferLength", "getByteBufferLength", "()I", "byteBufferStartIndex", "isClosed", "", "isEOF", "singleByteBuffer", "symbolBuffer", "close", "", "copyByteBufferInto", "dst", "dstOffset", "length", "decodeSymbolBufferInto", "dstEndIndex", "symbolBufferLength", "handlePaddingSymbol", "read", FirebaseAnalytics.Param.DESTINATION, "offset", "readNextSymbol", "resetByteBufferIfEmpty", "shiftByteBufferToStartIfNeeded", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
final class DecodeInputStream extends InputStream {
|
||||
private final Base64 base64;
|
||||
private final byte[] byteBuffer;
|
||||
private int byteBufferEndIndex;
|
||||
private int byteBufferStartIndex;
|
||||
private final InputStream input;
|
||||
private boolean isClosed;
|
||||
private boolean isEOF;
|
||||
private final byte[] singleByteBuffer;
|
||||
private final byte[] symbolBuffer;
|
||||
|
||||
public DecodeInputStream(InputStream input, Base64 base64) {
|
||||
Intrinsics.checkNotNullParameter(input, "input");
|
||||
Intrinsics.checkNotNullParameter(base64, "base64");
|
||||
this.input = input;
|
||||
this.base64 = base64;
|
||||
this.singleByteBuffer = new byte[1];
|
||||
this.symbolBuffer = new byte[1024];
|
||||
this.byteBuffer = new byte[1024];
|
||||
}
|
||||
|
||||
private final void copyByteBufferInto(byte[] dst, int dstOffset, int length) {
|
||||
byte[] bArr = this.byteBuffer;
|
||||
int i = this.byteBufferStartIndex;
|
||||
ArraysKt.copyInto(bArr, dst, dstOffset, i, i + length);
|
||||
this.byteBufferStartIndex += length;
|
||||
resetByteBufferIfEmpty();
|
||||
}
|
||||
|
||||
private final int decodeSymbolBufferInto(byte[] dst, int dstOffset, int dstEndIndex, int symbolBufferLength) {
|
||||
int i = this.byteBufferEndIndex;
|
||||
this.byteBufferEndIndex = i + this.base64.decodeIntoByteArray(this.symbolBuffer, this.byteBuffer, i, 0, symbolBufferLength);
|
||||
int min = Math.min(getByteBufferLength(), dstEndIndex - dstOffset);
|
||||
copyByteBufferInto(dst, dstOffset, min);
|
||||
shiftByteBufferToStartIfNeeded();
|
||||
return min;
|
||||
}
|
||||
|
||||
private final int getByteBufferLength() {
|
||||
return this.byteBufferEndIndex - this.byteBufferStartIndex;
|
||||
}
|
||||
|
||||
private final int handlePaddingSymbol(int symbolBufferLength) {
|
||||
this.symbolBuffer[symbolBufferLength] = Base64.padSymbol;
|
||||
if ((symbolBufferLength & 3) != 2) {
|
||||
return symbolBufferLength + 1;
|
||||
}
|
||||
int readNextSymbol = readNextSymbol();
|
||||
if (readNextSymbol >= 0) {
|
||||
this.symbolBuffer[symbolBufferLength + 1] = (byte) readNextSymbol;
|
||||
}
|
||||
return symbolBufferLength + 2;
|
||||
}
|
||||
|
||||
private final int readNextSymbol() {
|
||||
int read;
|
||||
if (!this.base64.getIsMimeScheme()) {
|
||||
return this.input.read();
|
||||
}
|
||||
do {
|
||||
read = this.input.read();
|
||||
if (read == -1) {
|
||||
break;
|
||||
}
|
||||
} while (!Base64Kt.isInMimeAlphabet(read));
|
||||
return read;
|
||||
}
|
||||
|
||||
private final void resetByteBufferIfEmpty() {
|
||||
if (this.byteBufferStartIndex == this.byteBufferEndIndex) {
|
||||
this.byteBufferStartIndex = 0;
|
||||
this.byteBufferEndIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private final void shiftByteBufferToStartIfNeeded() {
|
||||
byte[] bArr = this.byteBuffer;
|
||||
int length = bArr.length;
|
||||
int i = this.byteBufferEndIndex;
|
||||
if ((this.symbolBuffer.length / 4) * 3 > length - i) {
|
||||
ArraysKt.copyInto(bArr, bArr, 0, this.byteBufferStartIndex, i);
|
||||
this.byteBufferEndIndex -= this.byteBufferStartIndex;
|
||||
this.byteBufferStartIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream, java.io.Closeable, java.lang.AutoCloseable
|
||||
public void close() {
|
||||
if (this.isClosed) {
|
||||
return;
|
||||
}
|
||||
this.isClosed = true;
|
||||
this.input.close();
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public int read() {
|
||||
int i = this.byteBufferStartIndex;
|
||||
if (i < this.byteBufferEndIndex) {
|
||||
int i4 = this.byteBuffer[i] & UByte.MAX_VALUE;
|
||||
this.byteBufferStartIndex = i + 1;
|
||||
resetByteBufferIfEmpty();
|
||||
return i4;
|
||||
}
|
||||
int read = read(this.singleByteBuffer, 0, 1);
|
||||
if (read == -1) {
|
||||
return -1;
|
||||
}
|
||||
if (read == 1) {
|
||||
return this.singleByteBuffer[0] & UByte.MAX_VALUE;
|
||||
}
|
||||
throw new IllegalStateException("Unreachable");
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public int read(byte[] destination, int offset, int length) {
|
||||
int i;
|
||||
boolean z3;
|
||||
boolean z4;
|
||||
Intrinsics.checkNotNullParameter(destination, "destination");
|
||||
if (offset >= 0 && length >= 0 && (i = offset + length) <= destination.length) {
|
||||
if (!this.isClosed) {
|
||||
if (this.isEOF) {
|
||||
return -1;
|
||||
}
|
||||
if (length == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (getByteBufferLength() >= length) {
|
||||
copyByteBufferInto(destination, offset, length);
|
||||
return length;
|
||||
}
|
||||
int byteBufferLength = (((length - getByteBufferLength()) + 2) / 3) * 4;
|
||||
int i4 = offset;
|
||||
while (true) {
|
||||
z3 = this.isEOF;
|
||||
if (z3 || byteBufferLength <= 0) {
|
||||
break;
|
||||
}
|
||||
int min = Math.min(this.symbolBuffer.length, byteBufferLength);
|
||||
int i5 = 0;
|
||||
while (true) {
|
||||
z4 = this.isEOF;
|
||||
if (z4 || i5 >= min) {
|
||||
break;
|
||||
}
|
||||
int readNextSymbol = readNextSymbol();
|
||||
if (readNextSymbol == -1) {
|
||||
this.isEOF = true;
|
||||
} else if (readNextSymbol != 61) {
|
||||
this.symbolBuffer[i5] = (byte) readNextSymbol;
|
||||
i5++;
|
||||
} else {
|
||||
i5 = handlePaddingSymbol(i5);
|
||||
this.isEOF = true;
|
||||
}
|
||||
}
|
||||
if (!z4 && i5 != min) {
|
||||
throw new IllegalStateException("Check failed.");
|
||||
}
|
||||
byteBufferLength -= i5;
|
||||
i4 += decodeSymbolBufferInto(destination, i4, i, i5);
|
||||
}
|
||||
if (i4 == offset && z3) {
|
||||
return -1;
|
||||
}
|
||||
return i4 - offset;
|
||||
}
|
||||
throw new IOException("The input stream is closed.");
|
||||
}
|
||||
throw new IndexOutOfBoundsException("offset: " + offset + ", length: " + length + ", buffer size: " + destination.length);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package kotlin.io.encoding;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.ArraysKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0012\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\r\b\u0003\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\u000e\u001a\u00020\u000fH\u0002J\b\u0010\u0010\u001a\u00020\u000fH\u0016J \u0010\u0011\u001a\u00020\t2\u0006\u0010\u0012\u001a\u00020\u00072\u0006\u0010\u0013\u001a\u00020\t2\u0006\u0010\u0014\u001a\u00020\tH\u0002J\b\u0010\u0015\u001a\u00020\u000fH\u0002J \u0010\u0016\u001a\u00020\t2\u0006\u0010\u0012\u001a\u00020\u00072\u0006\u0010\u0013\u001a\u00020\t2\u0006\u0010\u0014\u001a\u00020\tH\u0002J\b\u0010\u0017\u001a\u00020\u000fH\u0016J \u0010\u0018\u001a\u00020\u000f2\u0006\u0010\u0012\u001a\u00020\u00072\u0006\u0010\u0019\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\tH\u0016J\u0010\u0010\u0018\u001a\u00020\u000f2\u0006\u0010\u001b\u001a\u00020\tH\u0016R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0001X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u001c"}, d2 = {"Lkotlin/io/encoding/EncodeOutputStream;", "Ljava/io/OutputStream;", "output", "base64", "Lkotlin/io/encoding/Base64;", "(Ljava/io/OutputStream;Lkotlin/io/encoding/Base64;)V", "byteBuffer", "", "byteBufferLength", "", "isClosed", "", "lineLength", "symbolBuffer", "checkOpen", "", "close", "copyIntoByteBuffer", "source", "startIndex", "endIndex", "encodeByteBufferIntoOutput", "encodeIntoOutput", "flush", "write", "offset", "length", "b", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
final class EncodeOutputStream extends OutputStream {
|
||||
private final Base64 base64;
|
||||
private final byte[] byteBuffer;
|
||||
private int byteBufferLength;
|
||||
private boolean isClosed;
|
||||
private int lineLength;
|
||||
private final OutputStream output;
|
||||
private final byte[] symbolBuffer;
|
||||
|
||||
public EncodeOutputStream(OutputStream output, Base64 base64) {
|
||||
Intrinsics.checkNotNullParameter(output, "output");
|
||||
Intrinsics.checkNotNullParameter(base64, "base64");
|
||||
this.output = output;
|
||||
this.base64 = base64;
|
||||
this.lineLength = base64.getIsMimeScheme() ? 76 : -1;
|
||||
this.symbolBuffer = new byte[1024];
|
||||
this.byteBuffer = new byte[3];
|
||||
}
|
||||
|
||||
private final void checkOpen() {
|
||||
if (this.isClosed) {
|
||||
throw new IOException("The output stream is closed.");
|
||||
}
|
||||
}
|
||||
|
||||
private final int copyIntoByteBuffer(byte[] source, int startIndex, int endIndex) {
|
||||
int min = Math.min(3 - this.byteBufferLength, endIndex - startIndex);
|
||||
ArraysKt.copyInto(source, this.byteBuffer, this.byteBufferLength, startIndex, startIndex + min);
|
||||
int i = this.byteBufferLength + min;
|
||||
this.byteBufferLength = i;
|
||||
if (i == 3) {
|
||||
encodeByteBufferIntoOutput();
|
||||
}
|
||||
return min;
|
||||
}
|
||||
|
||||
private final void encodeByteBufferIntoOutput() {
|
||||
if (encodeIntoOutput(this.byteBuffer, 0, this.byteBufferLength) != 4) {
|
||||
throw new IllegalStateException("Check failed.");
|
||||
}
|
||||
this.byteBufferLength = 0;
|
||||
}
|
||||
|
||||
private final int encodeIntoOutput(byte[] source, int startIndex, int endIndex) {
|
||||
int encodeIntoByteArray = this.base64.encodeIntoByteArray(source, this.symbolBuffer, 0, startIndex, endIndex);
|
||||
if (this.lineLength == 0) {
|
||||
this.output.write(Base64.INSTANCE.getMimeLineSeparatorSymbols$kotlin_stdlib());
|
||||
this.lineLength = 76;
|
||||
if (encodeIntoByteArray > 76) {
|
||||
throw new IllegalStateException("Check failed.");
|
||||
}
|
||||
}
|
||||
this.output.write(this.symbolBuffer, 0, encodeIntoByteArray);
|
||||
this.lineLength -= encodeIntoByteArray;
|
||||
return encodeIntoByteArray;
|
||||
}
|
||||
|
||||
@Override // java.io.OutputStream, java.io.Closeable, java.lang.AutoCloseable
|
||||
public void close() {
|
||||
if (this.isClosed) {
|
||||
return;
|
||||
}
|
||||
this.isClosed = true;
|
||||
if (this.byteBufferLength != 0) {
|
||||
encodeByteBufferIntoOutput();
|
||||
}
|
||||
this.output.close();
|
||||
}
|
||||
|
||||
@Override // java.io.OutputStream, java.io.Flushable
|
||||
public void flush() {
|
||||
checkOpen();
|
||||
this.output.flush();
|
||||
}
|
||||
|
||||
@Override // java.io.OutputStream
|
||||
public void write(int b4) {
|
||||
checkOpen();
|
||||
byte[] bArr = this.byteBuffer;
|
||||
int i = this.byteBufferLength;
|
||||
int i4 = i + 1;
|
||||
this.byteBufferLength = i4;
|
||||
bArr[i] = (byte) b4;
|
||||
if (i4 == 3) {
|
||||
encodeByteBufferIntoOutput();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // java.io.OutputStream
|
||||
public void write(byte[] source, int offset, int length) {
|
||||
int i;
|
||||
Intrinsics.checkNotNullParameter(source, "source");
|
||||
checkOpen();
|
||||
if (offset < 0 || length < 0 || (i = offset + length) > source.length) {
|
||||
throw new IndexOutOfBoundsException("offset: " + offset + ", length: " + length + ", source size: " + source.length);
|
||||
}
|
||||
if (length == 0) {
|
||||
return;
|
||||
}
|
||||
int i4 = this.byteBufferLength;
|
||||
if (i4 < 3) {
|
||||
if (i4 != 0) {
|
||||
offset += copyIntoByteBuffer(source, offset, i);
|
||||
if (this.byteBufferLength != 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
while (offset + 3 <= i) {
|
||||
int min = Math.min((this.base64.getIsMimeScheme() ? this.lineLength : this.symbolBuffer.length) / 4, (i - offset) / 3);
|
||||
int i5 = (min * 3) + offset;
|
||||
if (encodeIntoOutput(source, offset, i5) != min * 4) {
|
||||
throw new IllegalStateException("Check failed.");
|
||||
}
|
||||
offset = i5;
|
||||
}
|
||||
ArraysKt.copyInto(source, this.byteBuffer, 0, offset, i);
|
||||
this.byteBufferLength = i - offset;
|
||||
return;
|
||||
}
|
||||
throw new IllegalStateException("Check failed.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package kotlin.io.encoding;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.RequiresOptIn;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.annotation.AnnotationRetention;
|
||||
import kotlin.annotation.AnnotationTarget;
|
||||
import kotlin.annotation.MustBeDocumented;
|
||||
|
||||
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.ANNOTATION_TYPE})
|
||||
@SinceKotlin(version = "1.8")
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.ERROR)
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@kotlin.annotation.Retention(AnnotationRetention.BINARY)
|
||||
@MustBeDocumented
|
||||
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\b\u0087\u0002\u0018\u00002\u00020\u0001B\u0000¨\u0006\u0002"}, d2 = {"Lkotlin/io/encoding/ExperimentalEncodingApi;", "", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@Documented
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface ExperimentalEncodingApi {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package kotlin.io.encoding;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"kotlin/io/encoding/StreamEncodingKt__Base64IOStreamKt"}, k = 4, mv = {1, 9, 0}, xi = 49)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class StreamEncodingKt extends StreamEncodingKt__Base64IOStreamKt {
|
||||
private StreamEncodingKt() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package kotlin.io.encoding;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u001a\u0014\u0010\u0000\u001a\u00020\u0001*\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\u0007\u001a\u0014\u0010\u0004\u001a\u00020\u0005*\u00020\u00052\u0006\u0010\u0002\u001a\u00020\u0003H\u0007¨\u0006\u0006"}, d2 = {"decodingWith", "Ljava/io/InputStream;", "base64", "Lkotlin/io/encoding/Base64;", "encodingWith", "Ljava/io/OutputStream;", "kotlin-stdlib"}, k = 5, mv = {1, 9, 0}, xi = 49, xs = "kotlin/io/encoding/StreamEncodingKt")
|
||||
/* loaded from: classes3.dex */
|
||||
class StreamEncodingKt__Base64IOStreamKt {
|
||||
@ExperimentalEncodingApi
|
||||
@SinceKotlin(version = "1.8")
|
||||
public static final InputStream decodingWith(InputStream inputStream, Base64 base64) {
|
||||
Intrinsics.checkNotNullParameter(inputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(base64, "base64");
|
||||
return new DecodeInputStream(inputStream, base64);
|
||||
}
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@SinceKotlin(version = "1.8")
|
||||
public static final OutputStream encodingWith(OutputStream outputStream, Base64 base64) {
|
||||
Intrinsics.checkNotNullParameter(outputStream, "<this>");
|
||||
Intrinsics.checkNotNullParameter(base64, "base64");
|
||||
return new EncodeOutputStream(outputStream, base64);
|
||||
}
|
||||
}
|
||||
13
apk_decompiled/sources/kotlin/io/path/CopyActionContext.java
Normal file
13
apk_decompiled/sources/kotlin/io/path/CopyActionContext.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
|
||||
@SinceKotlin(version = "1.8")
|
||||
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\bg\u0018\u00002\u00020\u0001J\u001c\u0010\u0002\u001a\u00020\u0003*\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0006\u001a\u00020\u0007H&¨\u0006\b"}, d2 = {"Lkotlin/io/path/CopyActionContext;", "", "copyToIgnoringExistingDirectory", "Lkotlin/io/path/CopyActionResult;", "Ljava/nio/file/Path;", "target", "followLinks", "", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@ExperimentalPathApi
|
||||
/* loaded from: classes3.dex */
|
||||
public interface CopyActionContext {
|
||||
CopyActionResult copyToIgnoringExistingDirectory(Path path, Path path2, boolean z3);
|
||||
}
|
||||
45
apk_decompiled/sources/kotlin/io/path/CopyActionResult.java
Normal file
45
apk_decompiled/sources/kotlin/io/path/CopyActionResult.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
@SinceKotlin(version = "1.8")
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0005\b\u0087\u0081\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005¨\u0006\u0006"}, d2 = {"Lkotlin/io/path/CopyActionResult;", "", "(Ljava/lang/String;I)V", "CONTINUE", "SKIP_SUBTREE", "TERMINATE", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@ExperimentalPathApi
|
||||
/* loaded from: classes3.dex */
|
||||
public final class CopyActionResult {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ CopyActionResult[] $VALUES;
|
||||
public static final CopyActionResult CONTINUE = new CopyActionResult("CONTINUE", 0);
|
||||
public static final CopyActionResult SKIP_SUBTREE = new CopyActionResult("SKIP_SUBTREE", 1);
|
||||
public static final CopyActionResult TERMINATE = new CopyActionResult("TERMINATE", 2);
|
||||
|
||||
private static final /* synthetic */ CopyActionResult[] $values() {
|
||||
return new CopyActionResult[]{CONTINUE, SKIP_SUBTREE, TERMINATE};
|
||||
}
|
||||
|
||||
static {
|
||||
CopyActionResult[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private CopyActionResult(String str, int i) {
|
||||
}
|
||||
|
||||
public static EnumEntries<CopyActionResult> getEntries() {
|
||||
return $ENTRIES;
|
||||
}
|
||||
|
||||
public static CopyActionResult valueOf(String str) {
|
||||
return (CopyActionResult) Enum.valueOf(CopyActionResult.class, str);
|
||||
}
|
||||
|
||||
public static CopyActionResult[] values() {
|
||||
return (CopyActionResult[]) $VALUES.clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import java.nio.file.CopyOption;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.LinkOption;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\bÃ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u001c\u0010\u0003\u001a\u00020\u0004*\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\t"}, d2 = {"Lkotlin/io/path/DefaultCopyActionContext;", "Lkotlin/io/path/CopyActionContext;", "()V", "copyToIgnoringExistingDirectory", "Lkotlin/io/path/CopyActionResult;", "Ljava/nio/file/Path;", "target", "followLinks", "", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@ExperimentalPathApi
|
||||
/* loaded from: classes3.dex */
|
||||
public final class DefaultCopyActionContext implements CopyActionContext {
|
||||
public static final DefaultCopyActionContext INSTANCE = new DefaultCopyActionContext();
|
||||
|
||||
private DefaultCopyActionContext() {
|
||||
}
|
||||
|
||||
@Override // kotlin.io.path.CopyActionContext
|
||||
public CopyActionResult copyToIgnoringExistingDirectory(Path path, Path target, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(path, "<this>");
|
||||
Intrinsics.checkNotNullParameter(target, "target");
|
||||
LinkOption[] linkOptions = LinkFollowing.INSTANCE.toLinkOptions(z3);
|
||||
LinkOption[] linkOptionArr = (LinkOption[]) Arrays.copyOf(linkOptions, linkOptions.length);
|
||||
if (!Files.isDirectory(path, (LinkOption[]) Arrays.copyOf(linkOptionArr, linkOptionArr.length)) || !Files.isDirectory(target, (LinkOption[]) Arrays.copyOf(new LinkOption[]{LinkOption.NOFOLLOW_LINKS}, 1))) {
|
||||
CopyOption[] copyOptionArr = (CopyOption[]) Arrays.copyOf(linkOptions, linkOptions.length);
|
||||
Intrinsics.checkNotNullExpressionValue(Files.copy(path, target, (CopyOption[]) Arrays.copyOf(copyOptionArr, copyOptionArr.length)), "copy(...)");
|
||||
}
|
||||
return CopyActionResult.CONTINUE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import com.google.firebase.remoteconfig.RemoteConfigConstants;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.SimpleFileVisitor;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.ArrayDeque;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
|
||||
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\b\u0003\b\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\u0018\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u0010H\u0016J\u0014\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u00070\u00122\u0006\u0010\u0006\u001a\u00020\u0007J\u0018\u0010\u0013\u001a\u00020\r2\u0006\u0010\u0014\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u0010H\u0016R\u0010\u0010\u0006\u001a\u0004\u0018\u00010\u0007X\u0082\u000e¢\u0006\u0002\n\u0000R\u0014\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00070\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u0011\u0010\u0003\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000b¨\u0006\u0015"}, d2 = {"Lkotlin/io/path/DirectoryEntriesReader;", "Ljava/nio/file/SimpleFileVisitor;", "Ljava/nio/file/Path;", "followLinks", "", "(Z)V", "directoryNode", "Lkotlin/io/path/PathNode;", RemoteConfigConstants.ResponseFieldKey.ENTRIES, "Lkotlin/collections/ArrayDeque;", "getFollowLinks", "()Z", "preVisitDirectory", "Ljava/nio/file/FileVisitResult;", "dir", "attrs", "Ljava/nio/file/attribute/BasicFileAttributes;", "readEntries", "", "visitFile", "file", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nPathTreeWalk.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PathTreeWalk.kt\nkotlin/io/path/DirectoryEntriesReader\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,177:1\n1#2:178\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
final class DirectoryEntriesReader extends SimpleFileVisitor<Path> {
|
||||
private PathNode directoryNode;
|
||||
private ArrayDeque<PathNode> entries = new ArrayDeque<>();
|
||||
private final boolean followLinks;
|
||||
|
||||
public DirectoryEntriesReader(boolean z3) {
|
||||
this.followLinks = z3;
|
||||
}
|
||||
|
||||
public final boolean getFollowLinks() {
|
||||
return this.followLinks;
|
||||
}
|
||||
|
||||
public final List<PathNode> readEntries(PathNode directoryNode) {
|
||||
Intrinsics.checkNotNullParameter(directoryNode, "directoryNode");
|
||||
this.directoryNode = directoryNode;
|
||||
Files.walkFileTree(directoryNode.getPath(), LinkFollowing.INSTANCE.toVisitOptions(this.followLinks), 1, this);
|
||||
this.entries.removeFirst();
|
||||
ArrayDeque<PathNode> arrayDeque = this.entries;
|
||||
this.entries = new ArrayDeque<>();
|
||||
return arrayDeque;
|
||||
}
|
||||
|
||||
@Override // java.nio.file.SimpleFileVisitor, java.nio.file.FileVisitor
|
||||
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
|
||||
Intrinsics.checkNotNullParameter(dir, "dir");
|
||||
Intrinsics.checkNotNullParameter(attrs, "attrs");
|
||||
this.entries.add(new PathNode(dir, attrs.fileKey(), this.directoryNode));
|
||||
FileVisitResult preVisitDirectory = super.preVisitDirectory((DirectoryEntriesReader) dir, attrs);
|
||||
Intrinsics.checkNotNullExpressionValue(preVisitDirectory, "preVisitDirectory(...)");
|
||||
return preVisitDirectory;
|
||||
}
|
||||
|
||||
@Override // java.nio.file.SimpleFileVisitor, java.nio.file.FileVisitor
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
|
||||
Intrinsics.checkNotNullParameter(file, "file");
|
||||
Intrinsics.checkNotNullParameter(attrs, "attrs");
|
||||
this.entries.add(new PathNode(file, null, this.directoryNode));
|
||||
FileVisitResult visitFile = super.visitFile((DirectoryEntriesReader) file, attrs);
|
||||
Intrinsics.checkNotNullExpressionValue(visitFile, "visitFile(...)");
|
||||
return visitFile;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.nio.file.FileSystemException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0010\u0002\n\u0002\b\u0005\b\u0002\u0018\u00002\u00020\u0001B\u000f\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0012\u0010\u0015\u001a\u00020\u00162\n\u0010\u0017\u001a\u00060\u0007j\u0002`\bJ\u000e\u0010\u0018\u001a\u00020\u00162\u0006\u0010\u0019\u001a\u00020\fJ\u000e\u0010\u001a\u001a\u00020\u00162\u0006\u0010\u0019\u001a\u00020\fR\u001b\u0010\u0005\u001a\f\u0012\b\u0012\u00060\u0007j\u0002`\b0\u0006¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u001c\u0010\u000b\u001a\u0004\u0018\u00010\fX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\r\u0010\u000e\"\u0004\b\u000f\u0010\u0010R\u001e\u0010\u0012\u001a\u00020\u00032\u0006\u0010\u0011\u001a\u00020\u0003@BX\u0086\u000e¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0014¨\u0006\u001b"}, d2 = {"Lkotlin/io/path/ExceptionsCollector;", "", "limit", "", "(I)V", "collectedExceptions", "", "Ljava/lang/Exception;", "Lkotlin/Exception;", "getCollectedExceptions", "()Ljava/util/List;", NavArguments.ARG_DYNAMIC_LINKS_TAB, "Ljava/nio/file/Path;", "getPath", "()Ljava/nio/file/Path;", "setPath", "(Ljava/nio/file/Path;)V", "<set-?>", "totalExceptions", "getTotalExceptions", "()I", "collect", "", "exception", "enterEntry", AppMeasurementSdk.ConditionalUserProperty.NAME, "exitEntry", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ExceptionsCollector {
|
||||
private final List<Exception> collectedExceptions;
|
||||
private final int limit;
|
||||
private Path path;
|
||||
private int totalExceptions;
|
||||
|
||||
public ExceptionsCollector() {
|
||||
this(0, 1, null);
|
||||
}
|
||||
|
||||
public final void collect(Exception exception) {
|
||||
Intrinsics.checkNotNullParameter(exception, "exception");
|
||||
this.totalExceptions++;
|
||||
if (this.collectedExceptions.size() < this.limit) {
|
||||
if (this.path != null) {
|
||||
Throwable initCause = new FileSystemException(String.valueOf(this.path)).initCause(exception);
|
||||
Intrinsics.checkNotNull(initCause, "null cannot be cast to non-null type java.nio.file.FileSystemException");
|
||||
exception = (FileSystemException) initCause;
|
||||
}
|
||||
this.collectedExceptions.add(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public final void enterEntry(Path name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Path path = this.path;
|
||||
this.path = path != null ? path.resolve(name) : null;
|
||||
}
|
||||
|
||||
public final void exitEntry(Path name) {
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Path path = this.path;
|
||||
if (!Intrinsics.areEqual(name, path != null ? path.getFileName() : null)) {
|
||||
throw new IllegalArgumentException("Failed requirement.");
|
||||
}
|
||||
Path path2 = this.path;
|
||||
this.path = path2 != null ? path2.getParent() : null;
|
||||
}
|
||||
|
||||
public final List<Exception> getCollectedExceptions() {
|
||||
return this.collectedExceptions;
|
||||
}
|
||||
|
||||
public final Path getPath() {
|
||||
return this.path;
|
||||
}
|
||||
|
||||
public final int getTotalExceptions() {
|
||||
return this.totalExceptions;
|
||||
}
|
||||
|
||||
public final void setPath(Path path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public ExceptionsCollector(int i) {
|
||||
this.limit = i;
|
||||
this.collectedExceptions = new ArrayList();
|
||||
}
|
||||
|
||||
public /* synthetic */ ExceptionsCollector(int i, int i4, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this((i4 & 1) != 0 ? 64 : i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.RequiresOptIn;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.annotation.AnnotationRetention;
|
||||
import kotlin.annotation.AnnotationTarget;
|
||||
import kotlin.annotation.MustBeDocumented;
|
||||
|
||||
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.ANNOTATION_TYPE})
|
||||
@SinceKotlin(version = "1.4")
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.ERROR)
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@kotlin.annotation.Retention(AnnotationRetention.BINARY)
|
||||
@MustBeDocumented
|
||||
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\b\u0087\u0002\u0018\u00002\u00020\u0001B\u0000¨\u0006\u0002"}, d2 = {"Lkotlin/io/path/ExperimentalPathApi;", "", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@Documented
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface ExperimentalPathApi {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
@SinceKotlin(version = "1.7")
|
||||
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\bw\u0018\u00002\u00020\u0001JB\u0010\u0002\u001a\u00020\u000328\u0010\u0004\u001a4\u0012\u0013\u0012\u00110\u0006¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\t\u0012\u0015\u0012\u0013\u0018\u00010\n¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\u000b\u0012\u0004\u0012\u00020\f0\u0005H&J@\u0010\r\u001a\u00020\u000326\u0010\u0004\u001a2\u0012\u0013\u0012\u00110\u0006¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\t\u0012\u0013\u0012\u00110\u000e¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\u000f\u0012\u0004\u0012\u00020\f0\u0005H&J@\u0010\u0010\u001a\u00020\u000326\u0010\u0004\u001a2\u0012\u0013\u0012\u00110\u0006¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\u0011\u0012\u0013\u0012\u00110\u000e¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\u000f\u0012\u0004\u0012\u00020\f0\u0005H&J@\u0010\u0012\u001a\u00020\u000326\u0010\u0004\u001a2\u0012\u0013\u0012\u00110\u0006¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\u0011\u0012\u0013\u0012\u00110\n¢\u0006\f\b\u0007\u0012\b\b\b\u0012\u0004\b\b(\u000b\u0012\u0004\u0012\u00020\f0\u0005H&\u0082\u0001\u0001\u0013¨\u0006\u0014"}, d2 = {"Lkotlin/io/path/FileVisitorBuilder;", "", "onPostVisitDirectory", "", "function", "Lkotlin/Function2;", "Ljava/nio/file/Path;", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "directory", "Ljava/io/IOException;", "exception", "Ljava/nio/file/FileVisitResult;", "onPreVisitDirectory", "Ljava/nio/file/attribute/BasicFileAttributes;", "attributes", "onVisitFile", "file", "onVisitFileFailed", "Lkotlin/io/path/FileVisitorBuilderImpl;", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@ExperimentalPathApi
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FileVisitorBuilder {
|
||||
void onPostVisitDirectory(Function2<? super Path, ? super IOException, ? extends FileVisitResult> function);
|
||||
|
||||
void onPreVisitDirectory(Function2<? super Path, ? super BasicFileAttributes, ? extends FileVisitResult> function);
|
||||
|
||||
void onVisitFile(Function2<? super Path, ? super BasicFileAttributes, ? extends FileVisitResult> function);
|
||||
|
||||
void onVisitFileFailed(Function2<? super Path, ? super IOException, ? extends FileVisitResult> function);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import C.w;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.FileVisitor;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0001\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\f\u0010\u000e\u001a\b\u0012\u0004\u0012\u00020\u00070\u000fJ\b\u0010\u0010\u001a\u00020\u0011H\u0002J\u001a\u0010\u0012\u001a\u00020\u00112\b\u0010\u0013\u001a\u0004\u0018\u00010\u00142\u0006\u0010\u0015\u001a\u00020\u0016H\u0002JB\u0010\u0005\u001a\u00020\u001128\u0010\u0013\u001a4\u0012\u0013\u0012\u00110\u0007¢\u0006\f\b\u0017\u0012\b\b\u0015\u0012\u0004\b\b(\u0018\u0012\u0015\u0012\u0013\u0018\u00010\b¢\u0006\f\b\u0017\u0012\b\b\u0015\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020\t0\u0006H\u0016J@\u0010\n\u001a\u00020\u001126\u0010\u0013\u001a2\u0012\u0013\u0012\u00110\u0007¢\u0006\f\b\u0017\u0012\b\b\u0015\u0012\u0004\b\b(\u0018\u0012\u0013\u0012\u00110\u000b¢\u0006\f\b\u0017\u0012\b\b\u0015\u0012\u0004\b\b(\u001a\u0012\u0004\u0012\u00020\t0\u0006H\u0016J@\u0010\f\u001a\u00020\u001126\u0010\u0013\u001a2\u0012\u0013\u0012\u00110\u0007¢\u0006\f\b\u0017\u0012\b\b\u0015\u0012\u0004\b\b(\u001b\u0012\u0013\u0012\u00110\u000b¢\u0006\f\b\u0017\u0012\b\b\u0015\u0012\u0004\b\b(\u001a\u0012\u0004\u0012\u00020\t0\u0006H\u0016J@\u0010\r\u001a\u00020\u001126\u0010\u0013\u001a2\u0012\u0013\u0012\u00110\u0007¢\u0006\f\b\u0017\u0012\b\b\u0015\u0012\u0004\b\b(\u001b\u0012\u0013\u0012\u00110\b¢\u0006\f\b\u0017\u0012\b\b\u0015\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020\t0\u0006H\u0016R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u000e¢\u0006\u0002\n\u0000R$\u0010\u0005\u001a\u0018\u0012\u0004\u0012\u00020\u0007\u0012\u0006\u0012\u0004\u0018\u00010\b\u0012\u0004\u0012\u00020\t\u0018\u00010\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\"\u0010\n\u001a\u0016\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u000b\u0012\u0004\u0012\u00020\t\u0018\u00010\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\"\u0010\f\u001a\u0016\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u000b\u0012\u0004\u0012\u00020\t\u0018\u00010\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\"\u0010\r\u001a\u0016\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\b\u0012\u0004\u0012\u00020\t\u0018\u00010\u0006X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u001c"}, d2 = {"Lkotlin/io/path/FileVisitorBuilderImpl;", "Lkotlin/io/path/FileVisitorBuilder;", "()V", "isBuilt", "", "onPostVisitDirectory", "Lkotlin/Function2;", "Ljava/nio/file/Path;", "Ljava/io/IOException;", "Ljava/nio/file/FileVisitResult;", "onPreVisitDirectory", "Ljava/nio/file/attribute/BasicFileAttributes;", "onVisitFile", "onVisitFileFailed", "build", "Ljava/nio/file/FileVisitor;", "checkIsNotBuilt", "", "checkNotDefined", "function", "", AppMeasurementSdk.ConditionalUserProperty.NAME, "", "Lkotlin/ParameterName;", "directory", "exception", "attributes", "file", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@ExperimentalPathApi
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FileVisitorBuilderImpl implements FileVisitorBuilder {
|
||||
private boolean isBuilt;
|
||||
private Function2<? super Path, ? super IOException, ? extends FileVisitResult> onPostVisitDirectory;
|
||||
private Function2<? super Path, ? super BasicFileAttributes, ? extends FileVisitResult> onPreVisitDirectory;
|
||||
private Function2<? super Path, ? super BasicFileAttributes, ? extends FileVisitResult> onVisitFile;
|
||||
private Function2<? super Path, ? super IOException, ? extends FileVisitResult> onVisitFileFailed;
|
||||
|
||||
private final void checkIsNotBuilt() {
|
||||
if (this.isBuilt) {
|
||||
throw new IllegalStateException("This builder was already built");
|
||||
}
|
||||
}
|
||||
|
||||
private final void checkNotDefined(Object function, String name) {
|
||||
if (function != null) {
|
||||
throw new IllegalStateException(w.n(name, " was already defined"));
|
||||
}
|
||||
}
|
||||
|
||||
public final FileVisitor<Path> build() {
|
||||
checkIsNotBuilt();
|
||||
this.isBuilt = true;
|
||||
return new FileVisitorImpl(this.onPreVisitDirectory, this.onVisitFile, this.onVisitFileFailed, this.onPostVisitDirectory);
|
||||
}
|
||||
|
||||
@Override // kotlin.io.path.FileVisitorBuilder
|
||||
public void onPostVisitDirectory(Function2<? super Path, ? super IOException, ? extends FileVisitResult> function) {
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
checkIsNotBuilt();
|
||||
checkNotDefined(this.onPostVisitDirectory, "onPostVisitDirectory");
|
||||
this.onPostVisitDirectory = function;
|
||||
}
|
||||
|
||||
@Override // kotlin.io.path.FileVisitorBuilder
|
||||
public void onPreVisitDirectory(Function2<? super Path, ? super BasicFileAttributes, ? extends FileVisitResult> function) {
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
checkIsNotBuilt();
|
||||
checkNotDefined(this.onPreVisitDirectory, "onPreVisitDirectory");
|
||||
this.onPreVisitDirectory = function;
|
||||
}
|
||||
|
||||
@Override // kotlin.io.path.FileVisitorBuilder
|
||||
public void onVisitFile(Function2<? super Path, ? super BasicFileAttributes, ? extends FileVisitResult> function) {
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
checkIsNotBuilt();
|
||||
checkNotDefined(this.onVisitFile, "onVisitFile");
|
||||
this.onVisitFile = function;
|
||||
}
|
||||
|
||||
@Override // kotlin.io.path.FileVisitorBuilder
|
||||
public void onVisitFileFailed(Function2<? super Path, ? super IOException, ? extends FileVisitResult> function) {
|
||||
Intrinsics.checkNotNullParameter(function, "function");
|
||||
checkIsNotBuilt();
|
||||
checkNotDefined(this.onVisitFileFailed, "onVisitFileFailed");
|
||||
this.onVisitFileFailed = function;
|
||||
}
|
||||
}
|
||||
82
apk_decompiled/sources/kotlin/io/path/FileVisitorImpl.java
Normal file
82
apk_decompiled/sources/kotlin/io/path/FileVisitorImpl.java
Normal file
@@ -0,0 +1,82 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.SimpleFileVisitor;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u000b\b\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001Bw\u0012\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0004\u0012\u001a\u0010\u0007\u001a\u0016\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0004\u0012\u001a\u0010\b\u001a\u0016\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0004\u0012\u001c\u0010\n\u001a\u0018\u0012\u0004\u0012\u00020\u0002\u0012\u0006\u0012\u0004\u0018\u00010\t\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0004¢\u0006\u0002\u0010\u000bJ\u001a\u0010\f\u001a\u00020\u00062\u0006\u0010\r\u001a\u00020\u00022\b\u0010\u000e\u001a\u0004\u0018\u00010\tH\u0016J\u0018\u0010\u000f\u001a\u00020\u00062\u0006\u0010\r\u001a\u00020\u00022\u0006\u0010\u0010\u001a\u00020\u0005H\u0016J\u0018\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u00022\u0006\u0010\u0010\u001a\u00020\u0005H\u0016J\u0018\u0010\u0013\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\tH\u0016R$\u0010\n\u001a\u0018\u0012\u0004\u0012\u00020\u0002\u0012\u0006\u0012\u0004\u0018\u00010\t\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\"\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\"\u0010\u0007\u001a\u0016\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\"\u0010\b\u001a\u0016\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0014"}, d2 = {"Lkotlin/io/path/FileVisitorImpl;", "Ljava/nio/file/SimpleFileVisitor;", "Ljava/nio/file/Path;", "onPreVisitDirectory", "Lkotlin/Function2;", "Ljava/nio/file/attribute/BasicFileAttributes;", "Ljava/nio/file/FileVisitResult;", "onVisitFile", "onVisitFileFailed", "Ljava/io/IOException;", "onPostVisitDirectory", "(Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)V", "postVisitDirectory", "dir", "exc", "preVisitDirectory", "attrs", "visitFile", "file", "visitFileFailed", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
final class FileVisitorImpl extends SimpleFileVisitor<Path> {
|
||||
private final Function2<Path, IOException, FileVisitResult> onPostVisitDirectory;
|
||||
private final Function2<Path, BasicFileAttributes, FileVisitResult> onPreVisitDirectory;
|
||||
private final Function2<Path, BasicFileAttributes, FileVisitResult> onVisitFile;
|
||||
private final Function2<Path, IOException, FileVisitResult> onVisitFileFailed;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public FileVisitorImpl(Function2<? super Path, ? super BasicFileAttributes, ? extends FileVisitResult> function2, Function2<? super Path, ? super BasicFileAttributes, ? extends FileVisitResult> function22, Function2<? super Path, ? super IOException, ? extends FileVisitResult> function23, Function2<? super Path, ? super IOException, ? extends FileVisitResult> function24) {
|
||||
this.onPreVisitDirectory = function2;
|
||||
this.onVisitFile = function22;
|
||||
this.onVisitFileFailed = function23;
|
||||
this.onPostVisitDirectory = function24;
|
||||
}
|
||||
|
||||
@Override // java.nio.file.SimpleFileVisitor, java.nio.file.FileVisitor
|
||||
public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
|
||||
FileVisitResult invoke;
|
||||
Intrinsics.checkNotNullParameter(dir, "dir");
|
||||
Function2<Path, IOException, FileVisitResult> function2 = this.onPostVisitDirectory;
|
||||
if (function2 != null && (invoke = function2.invoke(dir, exc)) != null) {
|
||||
return invoke;
|
||||
}
|
||||
FileVisitResult postVisitDirectory = super.postVisitDirectory((FileVisitorImpl) dir, exc);
|
||||
Intrinsics.checkNotNullExpressionValue(postVisitDirectory, "postVisitDirectory(...)");
|
||||
return postVisitDirectory;
|
||||
}
|
||||
|
||||
@Override // java.nio.file.SimpleFileVisitor, java.nio.file.FileVisitor
|
||||
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
|
||||
FileVisitResult invoke;
|
||||
Intrinsics.checkNotNullParameter(dir, "dir");
|
||||
Intrinsics.checkNotNullParameter(attrs, "attrs");
|
||||
Function2<Path, BasicFileAttributes, FileVisitResult> function2 = this.onPreVisitDirectory;
|
||||
if (function2 != null && (invoke = function2.invoke(dir, attrs)) != null) {
|
||||
return invoke;
|
||||
}
|
||||
FileVisitResult preVisitDirectory = super.preVisitDirectory((FileVisitorImpl) dir, attrs);
|
||||
Intrinsics.checkNotNullExpressionValue(preVisitDirectory, "preVisitDirectory(...)");
|
||||
return preVisitDirectory;
|
||||
}
|
||||
|
||||
@Override // java.nio.file.SimpleFileVisitor, java.nio.file.FileVisitor
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
|
||||
FileVisitResult invoke;
|
||||
Intrinsics.checkNotNullParameter(file, "file");
|
||||
Intrinsics.checkNotNullParameter(attrs, "attrs");
|
||||
Function2<Path, BasicFileAttributes, FileVisitResult> function2 = this.onVisitFile;
|
||||
if (function2 != null && (invoke = function2.invoke(file, attrs)) != null) {
|
||||
return invoke;
|
||||
}
|
||||
FileVisitResult visitFile = super.visitFile((FileVisitorImpl) file, attrs);
|
||||
Intrinsics.checkNotNullExpressionValue(visitFile, "visitFile(...)");
|
||||
return visitFile;
|
||||
}
|
||||
|
||||
@Override // java.nio.file.SimpleFileVisitor, java.nio.file.FileVisitor
|
||||
public FileVisitResult visitFileFailed(Path file, IOException exc) {
|
||||
FileVisitResult invoke;
|
||||
Intrinsics.checkNotNullParameter(file, "file");
|
||||
Intrinsics.checkNotNullParameter(exc, "exc");
|
||||
Function2<Path, IOException, FileVisitResult> function2 = this.onVisitFileFailed;
|
||||
if (function2 != null && (invoke = function2.invoke(file, exc)) != null) {
|
||||
return invoke;
|
||||
}
|
||||
FileVisitResult visitFileFailed = super.visitFileFailed((FileVisitorImpl) file, exc);
|
||||
Intrinsics.checkNotNullExpressionValue(visitFileFailed, "visitFileFailed(...)");
|
||||
return visitFileFailed;
|
||||
}
|
||||
}
|
||||
30
apk_decompiled/sources/kotlin/io/path/LinkFollowing.java
Normal file
30
apk_decompiled/sources/kotlin/io/path/LinkFollowing.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import java.nio.file.FileVisitOption;
|
||||
import java.nio.file.LinkOption;
|
||||
import java.util.Set;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.collections.SetsKt;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
|
||||
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\"\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0003\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0019\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u00050\u00042\u0006\u0010\r\u001a\u00020\u000e¢\u0006\u0002\u0010\u000fJ\u0014\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020\t0\b2\u0006\u0010\r\u001a\u00020\u000eR\u0016\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u0006R\u0014\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u0016\u0010\n\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u0006R\u0014\u0010\u000b\u001a\b\u0012\u0004\u0012\u00020\t0\bX\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0011"}, d2 = {"Lkotlin/io/path/LinkFollowing;", "", "()V", "followLinkOption", "", "Ljava/nio/file/LinkOption;", "[Ljava/nio/file/LinkOption;", "followVisitOption", "", "Ljava/nio/file/FileVisitOption;", "nofollowLinkOption", "nofollowVisitOption", "toLinkOptions", "followLinks", "", "(Z)[Ljava/nio/file/LinkOption;", "toVisitOptions", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nPathTreeWalk.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PathTreeWalk.kt\nkotlin/io/path/LinkFollowing\n+ 2 ArrayIntrinsics.kt\nkotlin/ArrayIntrinsicsKt\n*L\n1#1,177:1\n26#2:178\n*S KotlinDebug\n*F\n+ 1 PathTreeWalk.kt\nkotlin/io/path/LinkFollowing\n*L\n142#1:178\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class LinkFollowing {
|
||||
public static final LinkFollowing INSTANCE = new LinkFollowing();
|
||||
private static final LinkOption[] nofollowLinkOption = {LinkOption.NOFOLLOW_LINKS};
|
||||
private static final LinkOption[] followLinkOption = new LinkOption[0];
|
||||
private static final Set<FileVisitOption> nofollowVisitOption = SetsKt.emptySet();
|
||||
private static final Set<FileVisitOption> followVisitOption = SetsKt.setOf(FileVisitOption.FOLLOW_LINKS);
|
||||
|
||||
private LinkFollowing() {
|
||||
}
|
||||
|
||||
public final LinkOption[] toLinkOptions(boolean followLinks) {
|
||||
return followLinks ? followLinkOption : nofollowLinkOption;
|
||||
}
|
||||
|
||||
public final Set<FileVisitOption> toVisitOptions(boolean followLinks) {
|
||||
return followLinks ? followVisitOption : nofollowVisitOption;
|
||||
}
|
||||
}
|
||||
44
apk_decompiled/sources/kotlin/io/path/OnErrorResult.java
Normal file
44
apk_decompiled/sources/kotlin/io/path/OnErrorResult.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
@SinceKotlin(version = "1.8")
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0004\b\u0087\u0081\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004¨\u0006\u0005"}, d2 = {"Lkotlin/io/path/OnErrorResult;", "", "(Ljava/lang/String;I)V", "SKIP_SUBTREE", "TERMINATE", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@ExperimentalPathApi
|
||||
/* loaded from: classes3.dex */
|
||||
public final class OnErrorResult {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ OnErrorResult[] $VALUES;
|
||||
public static final OnErrorResult SKIP_SUBTREE = new OnErrorResult("SKIP_SUBTREE", 0);
|
||||
public static final OnErrorResult TERMINATE = new OnErrorResult("TERMINATE", 1);
|
||||
|
||||
private static final /* synthetic */ OnErrorResult[] $values() {
|
||||
return new OnErrorResult[]{SKIP_SUBTREE, TERMINATE};
|
||||
}
|
||||
|
||||
static {
|
||||
OnErrorResult[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private OnErrorResult(String str, int i) {
|
||||
}
|
||||
|
||||
public static EnumEntries<OnErrorResult> getEntries() {
|
||||
return $ENTRIES;
|
||||
}
|
||||
|
||||
public static OnErrorResult valueOf(String str) {
|
||||
return (OnErrorResult) Enum.valueOf(OnErrorResult.class, str);
|
||||
}
|
||||
|
||||
public static OnErrorResult[] values() {
|
||||
return (OnErrorResult[]) $VALUES.clone();
|
||||
}
|
||||
}
|
||||
44
apk_decompiled/sources/kotlin/io/path/PathNode.java
Normal file
44
apk_decompiled/sources/kotlin/io/path/PathNode.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Iterator;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010(\n\u0002\b\u000b\b\u0002\u0018\u00002\u00020\u0001B!\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0001\u0012\b\u0010\u0005\u001a\u0004\u0018\u00010\u0000¢\u0006\u0002\u0010\u0006R\"\u0010\u0007\u001a\n\u0012\u0004\u0012\u00020\u0000\u0018\u00010\bX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\t\u0010\n\"\u0004\b\u000b\u0010\fR\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0001¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u0013\u0010\u0005\u001a\u0004\u0018\u00010\u0000¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012¨\u0006\u0013"}, d2 = {"Lkotlin/io/path/PathNode;", "", NavArguments.ARG_DYNAMIC_LINKS_TAB, "Ljava/nio/file/Path;", "key", "parent", "(Ljava/nio/file/Path;Ljava/lang/Object;Lkotlin/io/path/PathNode;)V", "contentIterator", "", "getContentIterator", "()Ljava/util/Iterator;", "setContentIterator", "(Ljava/util/Iterator;)V", "getKey", "()Ljava/lang/Object;", "getParent", "()Lkotlin/io/path/PathNode;", "getPath", "()Ljava/nio/file/Path;", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PathNode {
|
||||
private Iterator<PathNode> contentIterator;
|
||||
private final Object key;
|
||||
private final PathNode parent;
|
||||
private final Path path;
|
||||
|
||||
public PathNode(Path path, Object obj, PathNode pathNode) {
|
||||
Intrinsics.checkNotNullParameter(path, "path");
|
||||
this.path = path;
|
||||
this.key = obj;
|
||||
this.parent = pathNode;
|
||||
}
|
||||
|
||||
public final Iterator<PathNode> getContentIterator() {
|
||||
return this.contentIterator;
|
||||
}
|
||||
|
||||
public final Object getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public final PathNode getParent() {
|
||||
return this.parent;
|
||||
}
|
||||
|
||||
public final Path getPath() {
|
||||
return this.path;
|
||||
}
|
||||
|
||||
public final void setContentIterator(Iterator<PathNode> it) {
|
||||
this.contentIterator = it;
|
||||
}
|
||||
}
|
||||
49
apk_decompiled/sources/kotlin/io/path/PathRelativizer.java
Normal file
49
apk_decompiled/sources/kotlin/io/path/PathRelativizer.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.text.StringsKt;
|
||||
import kotlin.text.StringsKt__StringsJVMKt;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\bÂ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0016\u0010\u0007\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\u00042\u0006\u0010\t\u001a\u00020\u0004R\u0016\u0010\u0003\u001a\n \u0005*\u0004\u0018\u00010\u00040\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u0016\u0010\u0006\u001a\n \u0005*\u0004\u0018\u00010\u00040\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lkotlin/io/path/PathRelativizer;", "", "()V", "emptyPath", "Ljava/nio/file/Path;", "kotlin.jvm.PlatformType", "parentPath", "tryRelativeTo", NavArguments.ARG_DYNAMIC_LINKS_TAB, "base", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
final class PathRelativizer {
|
||||
public static final PathRelativizer INSTANCE = new PathRelativizer();
|
||||
private static final Path emptyPath = Paths.get("", new String[0]);
|
||||
private static final Path parentPath = Paths.get("..", new String[0]);
|
||||
|
||||
private PathRelativizer() {
|
||||
}
|
||||
|
||||
public final Path tryRelativeTo(Path path, Path base) {
|
||||
boolean endsWith$default;
|
||||
Intrinsics.checkNotNullParameter(path, "path");
|
||||
Intrinsics.checkNotNullParameter(base, "base");
|
||||
Path normalize = base.normalize();
|
||||
Path normalize2 = path.normalize();
|
||||
Path relativize = normalize.relativize(normalize2);
|
||||
int min = Math.min(normalize.getNameCount(), normalize2.getNameCount());
|
||||
for (int i = 0; i < min; i++) {
|
||||
Path name = normalize.getName(i);
|
||||
Path path2 = parentPath;
|
||||
if (!Intrinsics.areEqual(name, path2)) {
|
||||
break;
|
||||
}
|
||||
if (!Intrinsics.areEqual(normalize2.getName(i), path2)) {
|
||||
throw new IllegalArgumentException("Unable to compute relative path");
|
||||
}
|
||||
}
|
||||
if (Intrinsics.areEqual(normalize2, normalize) || !Intrinsics.areEqual(normalize, emptyPath)) {
|
||||
String obj = relativize.toString();
|
||||
String separator = relativize.getFileSystem().getSeparator();
|
||||
Intrinsics.checkNotNullExpressionValue(separator, "getSeparator(...)");
|
||||
endsWith$default = StringsKt__StringsJVMKt.endsWith$default(obj, separator, false, 2, null);
|
||||
normalize2 = endsWith$default ? relativize.getFileSystem().getPath(StringsKt.dropLast(obj, relativize.getFileSystem().getSeparator().length()), new String[0]) : relativize;
|
||||
}
|
||||
Intrinsics.checkNotNull(normalize2);
|
||||
return normalize2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.sequences.SequenceScope;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00030\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlin/sequences/SequenceScope;", "Ljava/nio/file/Path;"}, k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlin.io.path.PathTreeWalk$bfsIterator$1", f = "PathTreeWalk.kt", i = {0, 0, 0, 0, 0, 0, 1, 1, 1}, l = {184, 190}, m = "invokeSuspend", n = {"$this$iterator", "queue", "entriesReader", "pathNode", "this_$iv", "path$iv", "$this$iterator", "queue", "entriesReader"}, s = {"L$0", "L$1", "L$2", "L$3", "L$4", "L$5", "L$0", "L$1", "L$2"})
|
||||
@SourceDebugExtension({"SMAP\nPathTreeWalk.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PathTreeWalk.kt\nkotlin/io/path/PathTreeWalk$bfsIterator$1\n+ 2 PathTreeWalk.kt\nkotlin/io/path/PathTreeWalk\n*L\n1#1,177:1\n45#2,15:178\n*S KotlinDebug\n*F\n+ 1 PathTreeWalk.kt\nkotlin/io/path/PathTreeWalk$bfsIterator$1\n*L\n98#1:178,15\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PathTreeWalk$bfsIterator$1 extends RestrictedSuspendLambda implements Function2<SequenceScope<? super Path>, Continuation<? super Unit>, Object> {
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
Object L$4;
|
||||
Object L$5;
|
||||
int label;
|
||||
final /* synthetic */ PathTreeWalk this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public PathTreeWalk$bfsIterator$1(PathTreeWalk pathTreeWalk, Continuation<? super PathTreeWalk$bfsIterator$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.this$0 = pathTreeWalk;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
PathTreeWalk$bfsIterator$1 pathTreeWalk$bfsIterator$1 = new PathTreeWalk$bfsIterator$1(this.this$0, continuation);
|
||||
pathTreeWalk$bfsIterator$1.L$0 = obj;
|
||||
return pathTreeWalk$bfsIterator$1;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:33:0x00ef */
|
||||
/* JADX WARN: Removed duplicated region for block: B:9:0x0083 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:21:0x00ed -> B:6:0x007d). Please report as a decompilation issue!!! */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:22:0x00ef -> B:6:0x007d). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r12) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 301
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.io.path.PathTreeWalk$bfsIterator$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(SequenceScope<? super Path> sequenceScope, Continuation<? super Unit> continuation) {
|
||||
return ((PathTreeWalk$bfsIterator$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.sequences.SequenceScope;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00030\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlin/sequences/SequenceScope;", "Ljava/nio/file/Path;"}, k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlin.io.path.PathTreeWalk$dfsIterator$1", f = "PathTreeWalk.kt", i = {0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3}, l = {184, 190, 199, 205}, m = "invokeSuspend", n = {"$this$iterator", "stack", "entriesReader", "startNode", "this_$iv", "path$iv", "$this$iterator", "stack", "entriesReader", "$this$iterator", "stack", "entriesReader", "pathNode", "this_$iv", "path$iv", "$this$iterator", "stack", "entriesReader"}, s = {"L$0", "L$1", "L$2", "L$3", "L$4", "L$5", "L$0", "L$1", "L$2", "L$0", "L$1", "L$2", "L$3", "L$4", "L$5", "L$0", "L$1", "L$2"})
|
||||
@SourceDebugExtension({"SMAP\nPathTreeWalk.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PathTreeWalk.kt\nkotlin/io/path/PathTreeWalk$dfsIterator$1\n+ 2 PathTreeWalk.kt\nkotlin/io/path/PathTreeWalk\n*L\n1#1,177:1\n45#2,15:178\n45#2,15:193\n*S KotlinDebug\n*F\n+ 1 PathTreeWalk.kt\nkotlin/io/path/PathTreeWalk$dfsIterator$1\n*L\n67#1:178,15\n78#1:193,15\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PathTreeWalk$dfsIterator$1 extends RestrictedSuspendLambda implements Function2<SequenceScope<? super Path>, Continuation<? super Unit>, Object> {
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
Object L$4;
|
||||
Object L$5;
|
||||
int label;
|
||||
final /* synthetic */ PathTreeWalk this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public PathTreeWalk$dfsIterator$1(PathTreeWalk pathTreeWalk, Continuation<? super PathTreeWalk$dfsIterator$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.this$0 = pathTreeWalk;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
PathTreeWalk$dfsIterator$1 pathTreeWalk$dfsIterator$1 = new PathTreeWalk$dfsIterator$1(this.this$0, continuation);
|
||||
pathTreeWalk$dfsIterator$1.L$0 = obj;
|
||||
return pathTreeWalk$dfsIterator$1;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:70:0x013a, code lost:
|
||||
|
||||
if (r7.yield(r10, r13) == r0) goto L60;
|
||||
*/
|
||||
/* JADX WARN: Removed duplicated region for block: B:14:0x01c3 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x0144 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:54:0x0102 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:13:0x01c1 -> B:14:0x013e). Please report as a decompilation issue!!! */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:37:0x01c3 -> B:14:0x013e). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r14) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 524
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.io.path.PathTreeWalk$dfsIterator$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(SequenceScope<? super Path> sequenceScope, Continuation<? super Unit> continuation) {
|
||||
return ((PathTreeWalk$dfsIterator$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
95
apk_decompiled/sources/kotlin/io/path/PathTreeWalk.java
Normal file
95
apk_decompiled/sources/kotlin/io/path/PathTreeWalk.java
Normal file
@@ -0,0 +1,95 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import java.nio.file.FileSystemLoopException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.LinkOption;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.ArraysKt;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.InlineMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.sequences.Sequence;
|
||||
import kotlin.sequences.SequenceScope;
|
||||
import kotlin.sequences.SequencesKt;
|
||||
|
||||
@Metadata(d1 = {"\u0000V\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010(\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\b\u0002\b\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u001d\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u000e\u0010\u0004\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00060\u0005¢\u0006\u0002\u0010\u0007J\u000e\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00020\u0015H\u0002J\u000e\u0010\u0016\u001a\b\u0012\u0004\u0012\u00020\u00020\u0015H\u0002J\u000f\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u00020\u0015H\u0096\u0002JB\u0010\u0018\u001a\u00020\u0019*\b\u0012\u0004\u0012\u00020\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u001d\u001a\u00020\u001e2\u0018\u0010\u001f\u001a\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u001c0!\u0012\u0004\u0012\u00020\u00190 H\u0082H¢\u0006\u0002\u0010\"R\u0014\u0010\b\u001a\u00020\t8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\n\u0010\u000bR\u0014\u0010\f\u001a\u00020\t8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\r\u0010\u000bR\u0014\u0010\u000e\u001a\u00020\t8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u000e\u0010\u000bR\u001a\u0010\u000f\u001a\b\u0012\u0004\u0012\u00020\u00100\u00058BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u0011\u0010\u0012R\u0018\u0010\u0004\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00060\u0005X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u0013R\u000e\u0010\u0003\u001a\u00020\u0002X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006#"}, d2 = {"Lkotlin/io/path/PathTreeWalk;", "Lkotlin/sequences/Sequence;", "Ljava/nio/file/Path;", "start", "options", "", "Lkotlin/io/path/PathWalkOption;", "(Ljava/nio/file/Path;[Lkotlin/io/path/PathWalkOption;)V", "followLinks", "", "getFollowLinks", "()Z", "includeDirectories", "getIncludeDirectories", "isBFS", "linkOptions", "Ljava/nio/file/LinkOption;", "getLinkOptions", "()[Ljava/nio/file/LinkOption;", "[Lkotlin/io/path/PathWalkOption;", "bfsIterator", "", "dfsIterator", "iterator", "yieldIfNeeded", "", "Lkotlin/sequences/SequenceScope;", "node", "Lkotlin/io/path/PathNode;", "entriesReader", "Lkotlin/io/path/DirectoryEntriesReader;", "entriesAction", "Lkotlin/Function1;", "", "(Lkotlin/sequences/SequenceScope;Lkotlin/io/path/PathNode;Lkotlin/io/path/DirectoryEntriesReader;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@ExperimentalPathApi
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PathTreeWalk implements Sequence<Path> {
|
||||
private final PathWalkOption[] options;
|
||||
private final Path start;
|
||||
|
||||
public PathTreeWalk(Path start, PathWalkOption[] options) {
|
||||
Intrinsics.checkNotNullParameter(start, "start");
|
||||
Intrinsics.checkNotNullParameter(options, "options");
|
||||
this.start = start;
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
private final Iterator<Path> bfsIterator() {
|
||||
return SequencesKt.iterator(new PathTreeWalk$bfsIterator$1(this, null));
|
||||
}
|
||||
|
||||
private final Iterator<Path> dfsIterator() {
|
||||
return SequencesKt.iterator(new PathTreeWalk$dfsIterator$1(this, null));
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean getFollowLinks() {
|
||||
return ArraysKt.contains(this.options, PathWalkOption.FOLLOW_LINKS);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean getIncludeDirectories() {
|
||||
return ArraysKt.contains(this.options, PathWalkOption.INCLUDE_DIRECTORIES);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final LinkOption[] getLinkOptions() {
|
||||
return LinkFollowing.INSTANCE.toLinkOptions(getFollowLinks());
|
||||
}
|
||||
|
||||
private final boolean isBFS() {
|
||||
return ArraysKt.contains(this.options, PathWalkOption.BREADTH_FIRST);
|
||||
}
|
||||
|
||||
private final Object yieldIfNeeded(SequenceScope<? super Path> sequenceScope, PathNode pathNode, DirectoryEntriesReader directoryEntriesReader, Function1<? super List<PathNode>, Unit> function1, Continuation<? super Unit> continuation) {
|
||||
boolean createsCycle;
|
||||
Path path = pathNode.getPath();
|
||||
LinkOption[] linkOptions = getLinkOptions();
|
||||
LinkOption[] linkOptionArr = (LinkOption[]) Arrays.copyOf(linkOptions, linkOptions.length);
|
||||
if (Files.isDirectory(path, (LinkOption[]) Arrays.copyOf(linkOptionArr, linkOptionArr.length))) {
|
||||
createsCycle = PathTreeWalkKt.createsCycle(pathNode);
|
||||
if (createsCycle) {
|
||||
throw new FileSystemLoopException(path.toString());
|
||||
}
|
||||
if (getIncludeDirectories()) {
|
||||
InlineMarker.mark(0);
|
||||
sequenceScope.yield(path, continuation);
|
||||
InlineMarker.mark(1);
|
||||
}
|
||||
LinkOption[] linkOptions2 = getLinkOptions();
|
||||
LinkOption[] linkOptionArr2 = (LinkOption[]) Arrays.copyOf(linkOptions2, linkOptions2.length);
|
||||
if (Files.isDirectory(path, (LinkOption[]) Arrays.copyOf(linkOptionArr2, linkOptionArr2.length))) {
|
||||
function1.invoke(directoryEntriesReader.readEntries(pathNode));
|
||||
}
|
||||
} else if (Files.exists(path, (LinkOption[]) Arrays.copyOf(new LinkOption[]{LinkOption.NOFOLLOW_LINKS}, 1))) {
|
||||
InlineMarker.mark(0);
|
||||
sequenceScope.yield(path, continuation);
|
||||
InlineMarker.mark(1);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.sequences.Sequence
|
||||
public Iterator<Path> iterator() {
|
||||
return isBFS() ? bfsIterator() : dfsIterator();
|
||||
}
|
||||
}
|
||||
45
apk_decompiled/sources/kotlin/io/path/PathTreeWalkKt.java
Normal file
45
apk_decompiled/sources/kotlin/io/path/PathTreeWalkKt.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.LinkOption;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.Arrays;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000$\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\u0018\u0002\n\u0000\u001a%\u0010\u0000\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u0002\u001a\u00020\u00032\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005H\u0002¢\u0006\u0002\u0010\u0007\u001a\f\u0010\b\u001a\u00020\t*\u00020\nH\u0002¨\u0006\u000b"}, d2 = {"keyOf", "", NavArguments.ARG_DYNAMIC_LINKS_TAB, "Ljava/nio/file/Path;", "linkOptions", "", "Ljava/nio/file/LinkOption;", "(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Ljava/lang/Object;", "createsCycle", "", "Lkotlin/io/path/PathNode;", "kotlin-stdlib-jdk7"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PathTreeWalkKt {
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final boolean createsCycle(PathNode pathNode) {
|
||||
for (PathNode parent = pathNode.getParent(); parent != null; parent = parent.getParent()) {
|
||||
if (parent.getKey() == null || pathNode.getKey() == null) {
|
||||
try {
|
||||
if (Files.isSameFile(parent.getPath(), pathNode.getPath())) {
|
||||
return true;
|
||||
}
|
||||
} catch (IOException | SecurityException unused) {
|
||||
continue;
|
||||
}
|
||||
} else if (Intrinsics.areEqual(parent.getKey(), pathNode.getKey())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final Object keyOf(Path path, LinkOption[] linkOptionArr) {
|
||||
try {
|
||||
LinkOption[] linkOptionArr2 = (LinkOption[]) Arrays.copyOf(linkOptionArr, linkOptionArr.length);
|
||||
BasicFileAttributes readAttributes = Files.readAttributes(path, (Class<BasicFileAttributes>) BasicFileAttributes.class, (LinkOption[]) Arrays.copyOf(linkOptionArr2, linkOptionArr2.length));
|
||||
Intrinsics.checkNotNullExpressionValue(readAttributes, "readAttributes(...)");
|
||||
return readAttributes.fileKey();
|
||||
} catch (Throwable unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
apk_decompiled/sources/kotlin/io/path/PathWalkOption.java
Normal file
45
apk_decompiled/sources/kotlin/io/path/PathWalkOption.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.enums.EnumEntries;
|
||||
import kotlin.enums.EnumEntriesKt;
|
||||
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
|
||||
@SinceKotlin(version = "1.7")
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0005\b\u0087\u0081\u0002\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005¨\u0006\u0006"}, d2 = {"Lkotlin/io/path/PathWalkOption;", "", "(Ljava/lang/String;I)V", "INCLUDE_DIRECTORIES", "BREADTH_FIRST", "FOLLOW_LINKS", "kotlin-stdlib-jdk7"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@ExperimentalPathApi
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PathWalkOption {
|
||||
private static final /* synthetic */ EnumEntries $ENTRIES;
|
||||
private static final /* synthetic */ PathWalkOption[] $VALUES;
|
||||
public static final PathWalkOption INCLUDE_DIRECTORIES = new PathWalkOption("INCLUDE_DIRECTORIES", 0);
|
||||
public static final PathWalkOption BREADTH_FIRST = new PathWalkOption("BREADTH_FIRST", 1);
|
||||
public static final PathWalkOption FOLLOW_LINKS = new PathWalkOption("FOLLOW_LINKS", 2);
|
||||
|
||||
private static final /* synthetic */ PathWalkOption[] $values() {
|
||||
return new PathWalkOption[]{INCLUDE_DIRECTORIES, BREADTH_FIRST, FOLLOW_LINKS};
|
||||
}
|
||||
|
||||
static {
|
||||
PathWalkOption[] $values = $values();
|
||||
$VALUES = $values;
|
||||
$ENTRIES = EnumEntriesKt.enumEntries($values);
|
||||
}
|
||||
|
||||
private PathWalkOption(String str, int i) {
|
||||
}
|
||||
|
||||
public static EnumEntries<PathWalkOption> getEntries() {
|
||||
return $ENTRIES;
|
||||
}
|
||||
|
||||
public static PathWalkOption valueOf(String str) {
|
||||
return (PathWalkOption) Enum.valueOf(PathWalkOption.class, str);
|
||||
}
|
||||
|
||||
public static PathWalkOption[] values() {
|
||||
return (PathWalkOption[]) $VALUES.clone();
|
||||
}
|
||||
}
|
||||
10
apk_decompiled/sources/kotlin/io/path/PathsKt.java
Normal file
10
apk_decompiled/sources/kotlin/io/path/PathsKt.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"kotlin/io/path/PathsKt__PathReadWriteKt", "kotlin/io/path/PathsKt__PathRecursiveFunctionsKt", "kotlin/io/path/PathsKt__PathUtilsKt"}, k = 4, mv = {1, 9, 0}, xi = 49)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PathsKt extends PathsKt__PathUtilsKt {
|
||||
private PathsKt() {
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,539 @@
|
||||
package kotlin.io.path;
|
||||
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.CopyOption;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.FileSystemException;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.LinkOption;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.SecureDirectoryStream;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.nio.file.attribute.BasicFileAttributeView;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import kotlin.ExceptionsKt;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.NoWhenBranchMatchedException;
|
||||
import kotlin.SinceKotlin;
|
||||
import kotlin.Unit;
|
||||
import kotlin.io.CloseableKt;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.jvm.internal.SpreadBuilder;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
@Metadata(d1 = {"\u0000v\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a$\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00010\u0005H\u0082\b¢\u0006\u0002\b\u0006\u001a\u001d\u0010\u0007\u001a\u00020\u00012\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\u0002\u001a\u00020\u0003H\u0002¢\u0006\u0002\b\n\u001a\u001d\u0010\u000b\u001a\u00020\u00012\u0006\u0010\f\u001a\u00020\t2\u0006\u0010\u0002\u001a\u00020\u0003H\u0002¢\u0006\u0002\b\r\u001a&\u0010\u000e\u001a\u0004\u0018\u0001H\u000f\"\u0004\b\u0000\u0010\u000f2\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u0002H\u000f0\u0005H\u0082\b¢\u0006\u0004\b\u0010\u0010\u0011\u001aw\u0010\u0012\u001a\u00020\t*\u00020\t2\u0006\u0010\u0013\u001a\u00020\t2Q\b\u0002\u0010\u0014\u001aK\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0016\u0012\b\b\u0017\u0012\u0004\b\b(\u0018\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0016\u0012\b\b\u0017\u0012\u0004\b\b(\u0013\u0012\u0017\u0012\u00150\u0019j\u0002`\u001a¢\u0006\f\b\u0016\u0012\b\b\u0017\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u001c0\u00152\u0006\u0010\u001d\u001a\u00020\u001e2\u0006\u0010\u001f\u001a\u00020\u001eH\u0007\u001a´\u0001\u0010\u0012\u001a\u00020\t*\u00020\t2\u0006\u0010\u0013\u001a\u00020\t2Q\b\u0002\u0010\u0014\u001aK\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0016\u0012\b\b\u0017\u0012\u0004\b\b(\u0018\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0016\u0012\b\b\u0017\u0012\u0004\b\b(\u0013\u0012\u0017\u0012\u00150\u0019j\u0002`\u001a¢\u0006\f\b\u0016\u0012\b\b\u0017\u0012\u0004\b\b(\u001b\u0012\u0004\u0012\u00020\u001c0\u00152\u0006\u0010\u001d\u001a\u00020\u001e2C\b\u0002\u0010 \u001a=\u0012\u0004\u0012\u00020!\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0016\u0012\b\b\u0017\u0012\u0004\b\b(\u0018\u0012\u0013\u0012\u00110\t¢\u0006\f\b\u0016\u0012\b\b\u0017\u0012\u0004\b\b(\u0013\u0012\u0004\u0012\u00020\"0\u0015¢\u0006\u0002\b#H\u0007\u001a\f\u0010$\u001a\u00020\u0001*\u00020\tH\u0007\u001a\u001b\u0010%\u001a\f\u0012\b\u0012\u00060\u0019j\u0002`\u001a0&*\u00020\tH\u0002¢\u0006\u0002\b'\u001a'\u0010(\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\t0)2\u0006\u0010\u0017\u001a\u00020\t2\u0006\u0010\u0002\u001a\u00020\u0003H\u0002¢\u0006\u0002\b*\u001a'\u0010+\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\t0)2\u0006\u0010\u0017\u001a\u00020\t2\u0006\u0010\u0002\u001a\u00020\u0003H\u0002¢\u0006\u0002\b,\u001a5\u0010-\u001a\u00020\u001e*\b\u0012\u0004\u0012\u00020\t0)2\u0006\u0010.\u001a\u00020\t2\u0012\u0010/\u001a\n\u0012\u0006\b\u0001\u0012\u00020100\"\u000201H\u0002¢\u0006\u0004\b2\u00103\u001a\u0011\u00104\u001a\u000205*\u00020\"H\u0003¢\u0006\u0002\b6\u001a\u0011\u00104\u001a\u000205*\u00020\u001cH\u0003¢\u0006\u0002\b6¨\u00067"}, d2 = {"collectIfThrows", "", "collector", "Lkotlin/io/path/ExceptionsCollector;", "function", "Lkotlin/Function0;", "collectIfThrows$PathsKt__PathRecursiveFunctionsKt", "insecureEnterDirectory", NavArguments.ARG_DYNAMIC_LINKS_TAB, "Ljava/nio/file/Path;", "insecureEnterDirectory$PathsKt__PathRecursiveFunctionsKt", "insecureHandleEntry", "entry", "insecureHandleEntry$PathsKt__PathRecursiveFunctionsKt", "tryIgnoreNoSuchFileException", "R", "tryIgnoreNoSuchFileException$PathsKt__PathRecursiveFunctionsKt", "(Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;", "copyToRecursively", "target", "onError", "Lkotlin/Function3;", "Lkotlin/ParameterName;", AppMeasurementSdk.ConditionalUserProperty.NAME, "source", "Ljava/lang/Exception;", "Lkotlin/Exception;", "exception", "Lkotlin/io/path/OnErrorResult;", "followLinks", "", "overwrite", "copyAction", "Lkotlin/io/path/CopyActionContext;", "Lkotlin/io/path/CopyActionResult;", "Lkotlin/ExtensionFunctionType;", "deleteRecursively", "deleteRecursivelyImpl", "", "deleteRecursivelyImpl$PathsKt__PathRecursiveFunctionsKt", "enterDirectory", "Ljava/nio/file/SecureDirectoryStream;", "enterDirectory$PathsKt__PathRecursiveFunctionsKt", "handleEntry", "handleEntry$PathsKt__PathRecursiveFunctionsKt", "isDirectory", "entryName", "options", "", "Ljava/nio/file/LinkOption;", "isDirectory$PathsKt__PathRecursiveFunctionsKt", "(Ljava/nio/file/SecureDirectoryStream;Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z", "toFileVisitResult", "Ljava/nio/file/FileVisitResult;", "toFileVisitResult$PathsKt__PathRecursiveFunctionsKt", "kotlin-stdlib-jdk7"}, k = 5, mv = {1, 9, 0}, xi = 49, xs = "kotlin/io/path/PathsKt")
|
||||
@SourceDebugExtension({"SMAP\nPathRecursiveFunctions.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PathRecursiveFunctions.kt\nkotlin/io/path/PathsKt__PathRecursiveFunctionsKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,430:1\n346#1,2:434\n354#1:436\n354#1:437\n348#1,4:438\n346#1,2:442\n354#1:444\n348#1,4:445\n354#1:449\n346#1,6:450\n346#1,2:456\n354#1:458\n348#1,4:459\n1#2:431\n1855#3,2:432\n*S KotlinDebug\n*F\n+ 1 PathRecursiveFunctions.kt\nkotlin/io/path/PathsKt__PathRecursiveFunctionsKt\n*L\n362#1:434,2\n371#1:436\n374#1:437\n362#1:438,4\n382#1:442,2\n383#1:444\n382#1:445,4\n394#1:449\n402#1:450,6\n420#1:456,2\n421#1:458\n420#1:459,4\n284#1:432,2\n*E\n"})
|
||||
/* loaded from: classes3.dex */
|
||||
public class PathsKt__PathRecursiveFunctionsKt extends PathsKt__PathReadWriteKt {
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$1;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[CopyActionResult.values().length];
|
||||
try {
|
||||
iArr[CopyActionResult.CONTINUE.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
iArr[CopyActionResult.TERMINATE.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
try {
|
||||
iArr[CopyActionResult.SKIP_SUBTREE.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused3) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
int[] iArr2 = new int[OnErrorResult.values().length];
|
||||
try {
|
||||
iArr2[OnErrorResult.TERMINATE.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused4) {
|
||||
}
|
||||
try {
|
||||
iArr2[OnErrorResult.SKIP_SUBTREE.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused5) {
|
||||
}
|
||||
$EnumSwitchMapping$1 = iArr2;
|
||||
}
|
||||
}
|
||||
|
||||
private static final void collectIfThrows$PathsKt__PathRecursiveFunctionsKt(ExceptionsCollector exceptionsCollector, Function0<Unit> function0) {
|
||||
try {
|
||||
function0.invoke();
|
||||
} catch (Exception e4) {
|
||||
exceptionsCollector.collect(e4);
|
||||
}
|
||||
}
|
||||
|
||||
@SinceKotlin(version = "1.8")
|
||||
@ExperimentalPathApi
|
||||
public static final Path copyToRecursively(Path path, Path target, Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult> onError, final boolean z3, boolean z4) {
|
||||
Intrinsics.checkNotNullParameter(path, "<this>");
|
||||
Intrinsics.checkNotNullParameter(target, "target");
|
||||
Intrinsics.checkNotNullParameter(onError, "onError");
|
||||
if (z4) {
|
||||
return copyToRecursively(path, target, onError, z3, new Function3<CopyActionContext, Path, Path, CopyActionResult>() { // from class: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$2
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(3);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final CopyActionResult invoke(CopyActionContext copyToRecursively, Path src, Path dst) {
|
||||
Intrinsics.checkNotNullParameter(copyToRecursively, "$this$copyToRecursively");
|
||||
Intrinsics.checkNotNullParameter(src, "src");
|
||||
Intrinsics.checkNotNullParameter(dst, "dst");
|
||||
LinkOption[] linkOptions = LinkFollowing.INSTANCE.toLinkOptions(z3);
|
||||
boolean isDirectory = Files.isDirectory(dst, (LinkOption[]) Arrays.copyOf(new LinkOption[]{LinkOption.NOFOLLOW_LINKS}, 1));
|
||||
LinkOption[] linkOptionArr = (LinkOption[]) Arrays.copyOf(linkOptions, linkOptions.length);
|
||||
if (!Files.isDirectory(src, (LinkOption[]) Arrays.copyOf(linkOptionArr, linkOptionArr.length)) || !isDirectory) {
|
||||
if (isDirectory) {
|
||||
PathsKt__PathRecursiveFunctionsKt.deleteRecursively(dst);
|
||||
}
|
||||
SpreadBuilder spreadBuilder = new SpreadBuilder(2);
|
||||
spreadBuilder.addSpread(linkOptions);
|
||||
spreadBuilder.add(StandardCopyOption.REPLACE_EXISTING);
|
||||
CopyOption[] copyOptionArr = (CopyOption[]) spreadBuilder.toArray(new CopyOption[spreadBuilder.size()]);
|
||||
Intrinsics.checkNotNullExpressionValue(Files.copy(src, dst, (CopyOption[]) Arrays.copyOf(copyOptionArr, copyOptionArr.length)), "copy(...)");
|
||||
}
|
||||
return CopyActionResult.CONTINUE;
|
||||
}
|
||||
});
|
||||
}
|
||||
return copyToRecursively$default(path, target, onError, z3, (Function3) null, 8, (Object) null);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final FileVisitResult copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt(Function3<? super CopyActionContext, ? super Path, ? super Path, ? extends CopyActionResult> function3, Path path, Path path2, Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult> function32, Path path3, BasicFileAttributes basicFileAttributes) {
|
||||
try {
|
||||
return toFileVisitResult$PathsKt__PathRecursiveFunctionsKt(function3.invoke(DefaultCopyActionContext.INSTANCE, path3, copyToRecursively$destination$PathsKt__PathRecursiveFunctionsKt(path, path2, path3)));
|
||||
} catch (Exception e4) {
|
||||
return copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt(function32, path, path2, path3, e4);
|
||||
}
|
||||
}
|
||||
|
||||
public static /* synthetic */ Path copyToRecursively$default(Path path, Path path2, Function3 function3, boolean z3, boolean z4, int i, Object obj) {
|
||||
if ((i & 2) != 0) {
|
||||
function3 = new Function3() { // from class: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$1
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final Void invoke(Path path3, Path path4, Exception exception) {
|
||||
Intrinsics.checkNotNullParameter(path3, "<anonymous parameter 0>");
|
||||
Intrinsics.checkNotNullParameter(path4, "<anonymous parameter 1>");
|
||||
Intrinsics.checkNotNullParameter(exception, "exception");
|
||||
throw exception;
|
||||
}
|
||||
};
|
||||
}
|
||||
return copyToRecursively(path, path2, (Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult>) function3, z3, z4);
|
||||
}
|
||||
|
||||
private static final Path copyToRecursively$destination$PathsKt__PathRecursiveFunctionsKt(Path path, Path path2, Path path3) {
|
||||
Path resolve = path2.resolve(PathsKt__PathUtilsKt.relativeTo(path3, path).toString());
|
||||
Intrinsics.checkNotNullExpressionValue(resolve, "resolve(...)");
|
||||
return resolve;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static final FileVisitResult copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt(Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult> function3, Path path, Path path2, Path path3, Exception exc) {
|
||||
return toFileVisitResult$PathsKt__PathRecursiveFunctionsKt(function3.invoke(path3, copyToRecursively$destination$PathsKt__PathRecursiveFunctionsKt(path, path2, path3), exc));
|
||||
}
|
||||
|
||||
@SinceKotlin(version = "1.8")
|
||||
@ExperimentalPathApi
|
||||
public static final void deleteRecursively(Path path) {
|
||||
Intrinsics.checkNotNullParameter(path, "<this>");
|
||||
List<Exception> deleteRecursivelyImpl$PathsKt__PathRecursiveFunctionsKt = deleteRecursivelyImpl$PathsKt__PathRecursiveFunctionsKt(path);
|
||||
if (deleteRecursivelyImpl$PathsKt__PathRecursiveFunctionsKt.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
FileSystemException fileSystemException = new FileSystemException("Failed to delete one or more files. See suppressed exceptions for details.");
|
||||
Iterator<T> it = deleteRecursivelyImpl$PathsKt__PathRecursiveFunctionsKt.iterator();
|
||||
while (it.hasNext()) {
|
||||
ExceptionsKt.addSuppressed(fileSystemException, (Exception) it.next());
|
||||
}
|
||||
throw fileSystemException;
|
||||
}
|
||||
|
||||
private static final List<Exception> deleteRecursivelyImpl$PathsKt__PathRecursiveFunctionsKt(Path path) {
|
||||
DirectoryStream<Path> directoryStream;
|
||||
boolean z3 = false;
|
||||
boolean z4 = true;
|
||||
ExceptionsCollector exceptionsCollector = new ExceptionsCollector(0, 1, null);
|
||||
Path parent = path.getParent();
|
||||
if (parent != null) {
|
||||
try {
|
||||
directoryStream = Files.newDirectoryStream(parent);
|
||||
} catch (Throwable unused) {
|
||||
directoryStream = null;
|
||||
}
|
||||
if (directoryStream != null) {
|
||||
try {
|
||||
if (directoryStream instanceof SecureDirectoryStream) {
|
||||
exceptionsCollector.setPath(parent);
|
||||
Path fileName = path.getFileName();
|
||||
Intrinsics.checkNotNullExpressionValue(fileName, "getFileName(...)");
|
||||
handleEntry$PathsKt__PathRecursiveFunctionsKt((SecureDirectoryStream) directoryStream, fileName, exceptionsCollector);
|
||||
} else {
|
||||
z3 = true;
|
||||
}
|
||||
Unit unit = Unit.INSTANCE;
|
||||
CloseableKt.closeFinally(directoryStream, null);
|
||||
z4 = z3;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (z4) {
|
||||
insecureHandleEntry$PathsKt__PathRecursiveFunctionsKt(path, exceptionsCollector);
|
||||
}
|
||||
return exceptionsCollector.getCollectedExceptions();
|
||||
}
|
||||
|
||||
private static final void enterDirectory$PathsKt__PathRecursiveFunctionsKt(SecureDirectoryStream<Path> secureDirectoryStream, Path path, ExceptionsCollector exceptionsCollector) {
|
||||
SecureDirectoryStream<Path> secureDirectoryStream2;
|
||||
try {
|
||||
try {
|
||||
secureDirectoryStream2 = secureDirectoryStream.newDirectoryStream(path, LinkOption.NOFOLLOW_LINKS);
|
||||
} catch (Exception e4) {
|
||||
exceptionsCollector.collect(e4);
|
||||
return;
|
||||
}
|
||||
} catch (NoSuchFileException unused) {
|
||||
secureDirectoryStream2 = null;
|
||||
}
|
||||
if (secureDirectoryStream2 == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Iterator<Path> it = secureDirectoryStream2.iterator();
|
||||
while (it.hasNext()) {
|
||||
Path fileName = it.next().getFileName();
|
||||
Intrinsics.checkNotNullExpressionValue(fileName, "getFileName(...)");
|
||||
handleEntry$PathsKt__PathRecursiveFunctionsKt(secureDirectoryStream2, fileName, exceptionsCollector);
|
||||
}
|
||||
Unit unit = Unit.INSTANCE;
|
||||
CloseableKt.closeFinally(secureDirectoryStream2, null);
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
private static final void handleEntry$PathsKt__PathRecursiveFunctionsKt(SecureDirectoryStream<Path> secureDirectoryStream, Path path, ExceptionsCollector exceptionsCollector) {
|
||||
exceptionsCollector.enterEntry(path);
|
||||
try {
|
||||
} catch (Exception e4) {
|
||||
exceptionsCollector.collect(e4);
|
||||
}
|
||||
if (isDirectory$PathsKt__PathRecursiveFunctionsKt(secureDirectoryStream, path, LinkOption.NOFOLLOW_LINKS)) {
|
||||
int totalExceptions = exceptionsCollector.getTotalExceptions();
|
||||
enterDirectory$PathsKt__PathRecursiveFunctionsKt(secureDirectoryStream, path, exceptionsCollector);
|
||||
if (totalExceptions == exceptionsCollector.getTotalExceptions()) {
|
||||
secureDirectoryStream.deleteDirectory(path);
|
||||
Unit unit = Unit.INSTANCE;
|
||||
}
|
||||
exceptionsCollector.exitEntry(path);
|
||||
}
|
||||
secureDirectoryStream.deleteFile(path);
|
||||
Unit unit2 = Unit.INSTANCE;
|
||||
exceptionsCollector.exitEntry(path);
|
||||
}
|
||||
|
||||
private static final void insecureEnterDirectory$PathsKt__PathRecursiveFunctionsKt(Path path, ExceptionsCollector exceptionsCollector) {
|
||||
DirectoryStream<Path> directoryStream;
|
||||
try {
|
||||
try {
|
||||
directoryStream = Files.newDirectoryStream(path);
|
||||
} catch (Exception e4) {
|
||||
exceptionsCollector.collect(e4);
|
||||
return;
|
||||
}
|
||||
} catch (NoSuchFileException unused) {
|
||||
directoryStream = null;
|
||||
}
|
||||
if (directoryStream == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
for (Path path2 : directoryStream) {
|
||||
Intrinsics.checkNotNull(path2);
|
||||
insecureHandleEntry$PathsKt__PathRecursiveFunctionsKt(path2, exceptionsCollector);
|
||||
}
|
||||
Unit unit = Unit.INSTANCE;
|
||||
CloseableKt.closeFinally(directoryStream, null);
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
private static final void insecureHandleEntry$PathsKt__PathRecursiveFunctionsKt(Path path, ExceptionsCollector exceptionsCollector) {
|
||||
try {
|
||||
if (!Files.isDirectory(path, (LinkOption[]) Arrays.copyOf(new LinkOption[]{LinkOption.NOFOLLOW_LINKS}, 1))) {
|
||||
Files.deleteIfExists(path);
|
||||
return;
|
||||
}
|
||||
int totalExceptions = exceptionsCollector.getTotalExceptions();
|
||||
insecureEnterDirectory$PathsKt__PathRecursiveFunctionsKt(path, exceptionsCollector);
|
||||
if (totalExceptions == exceptionsCollector.getTotalExceptions()) {
|
||||
Files.deleteIfExists(path);
|
||||
}
|
||||
} catch (Exception e4) {
|
||||
exceptionsCollector.collect(e4);
|
||||
}
|
||||
}
|
||||
|
||||
private static final boolean isDirectory$PathsKt__PathRecursiveFunctionsKt(SecureDirectoryStream<Path> secureDirectoryStream, Path path, LinkOption... linkOptionArr) {
|
||||
Boolean bool;
|
||||
try {
|
||||
bool = Boolean.valueOf(((BasicFileAttributeView) secureDirectoryStream.getFileAttributeView(path, BasicFileAttributeView.class, (LinkOption[]) Arrays.copyOf(linkOptionArr, linkOptionArr.length))).readAttributes().isDirectory());
|
||||
} catch (NoSuchFileException unused) {
|
||||
bool = null;
|
||||
}
|
||||
if (bool != null) {
|
||||
return bool.booleanValue();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ExperimentalPathApi
|
||||
private static final FileVisitResult toFileVisitResult$PathsKt__PathRecursiveFunctionsKt(CopyActionResult copyActionResult) {
|
||||
int i = WhenMappings.$EnumSwitchMapping$0[copyActionResult.ordinal()];
|
||||
if (i == 1) {
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
if (i == 2) {
|
||||
return FileVisitResult.TERMINATE;
|
||||
}
|
||||
if (i == 3) {
|
||||
return FileVisitResult.SKIP_SUBTREE;
|
||||
}
|
||||
throw new NoWhenBranchMatchedException();
|
||||
}
|
||||
|
||||
private static final <R> R tryIgnoreNoSuchFileException$PathsKt__PathRecursiveFunctionsKt(Function0<? extends R> function0) {
|
||||
try {
|
||||
return function0.invoke();
|
||||
} catch (NoSuchFileException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@SinceKotlin(version = "1.8")
|
||||
@ExperimentalPathApi
|
||||
public static final Path copyToRecursively(final Path path, final Path target, final Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult> onError, boolean z3, final Function3<? super CopyActionContext, ? super Path, ? super Path, ? extends CopyActionResult> copyAction) {
|
||||
Intrinsics.checkNotNullParameter(path, "<this>");
|
||||
Intrinsics.checkNotNullParameter(target, "target");
|
||||
Intrinsics.checkNotNullParameter(onError, "onError");
|
||||
Intrinsics.checkNotNullParameter(copyAction, "copyAction");
|
||||
LinkOption[] linkOptions = LinkFollowing.INSTANCE.toLinkOptions(z3);
|
||||
LinkOption[] linkOptionArr = (LinkOption[]) Arrays.copyOf(linkOptions, linkOptions.length);
|
||||
if (Files.exists(path, (LinkOption[]) Arrays.copyOf(linkOptionArr, linkOptionArr.length))) {
|
||||
boolean z4 = false;
|
||||
if (Files.exists(path, (LinkOption[]) Arrays.copyOf(new LinkOption[0], 0)) && (z3 || !Files.isSymbolicLink(path))) {
|
||||
boolean z5 = Files.exists(target, (LinkOption[]) Arrays.copyOf(new LinkOption[0], 0)) && !Files.isSymbolicLink(target);
|
||||
if (!z5 || !Files.isSameFile(path, target)) {
|
||||
if (Intrinsics.areEqual(path.getFileSystem(), target.getFileSystem())) {
|
||||
if (z5) {
|
||||
z4 = target.toRealPath(new LinkOption[0]).startsWith(path.toRealPath(new LinkOption[0]));
|
||||
} else {
|
||||
Path parent = target.getParent();
|
||||
if (parent != null && Files.exists(parent, (LinkOption[]) Arrays.copyOf(new LinkOption[0], 0)) && parent.toRealPath(new LinkOption[0]).startsWith(path.toRealPath(new LinkOption[0]))) {
|
||||
z4 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (z4) {
|
||||
throw new FileSystemException(path.toString(), target.toString(), "Recursively copying a directory into its subdirectory is prohibited.");
|
||||
}
|
||||
}
|
||||
}
|
||||
PathsKt__PathUtilsKt.visitFileTree$default(path, 0, z3, new Function1<FileVisitorBuilder, Unit>() { // from class: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$5
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* renamed from: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$5$1, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class AnonymousClass1 extends FunctionReferenceImpl implements Function2<Path, BasicFileAttributes, FileVisitResult> {
|
||||
final /* synthetic */ Function3<CopyActionContext, Path, Path, CopyActionResult> $copyAction;
|
||||
final /* synthetic */ Function3<Path, Path, Exception, OnErrorResult> $onError;
|
||||
final /* synthetic */ Path $target;
|
||||
final /* synthetic */ Path $this_copyToRecursively;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public AnonymousClass1(Function3<? super CopyActionContext, ? super Path, ? super Path, ? extends CopyActionResult> function3, Path path, Path path2, Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult> function32) {
|
||||
super(2, Intrinsics.Kotlin.class, "copy", "copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt(Lkotlin/jvm/functions/Function3;Ljava/nio/file/Path;Ljava/nio/file/Path;Lkotlin/jvm/functions/Function3;Ljava/nio/file/Path;Ljava/nio/file/attribute/BasicFileAttributes;)Ljava/nio/file/FileVisitResult;", 0);
|
||||
this.$copyAction = function3;
|
||||
this.$this_copyToRecursively = path;
|
||||
this.$target = path2;
|
||||
this.$onError = function32;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final FileVisitResult invoke(Path p02, BasicFileAttributes p12) {
|
||||
FileVisitResult copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt;
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
Intrinsics.checkNotNullParameter(p12, "p1");
|
||||
copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt = PathsKt__PathRecursiveFunctionsKt.copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt(this.$copyAction, this.$this_copyToRecursively, this.$target, this.$onError, p02, p12);
|
||||
return copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt;
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* renamed from: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$5$2, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class AnonymousClass2 extends FunctionReferenceImpl implements Function2<Path, BasicFileAttributes, FileVisitResult> {
|
||||
final /* synthetic */ Function3<CopyActionContext, Path, Path, CopyActionResult> $copyAction;
|
||||
final /* synthetic */ Function3<Path, Path, Exception, OnErrorResult> $onError;
|
||||
final /* synthetic */ Path $target;
|
||||
final /* synthetic */ Path $this_copyToRecursively;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public AnonymousClass2(Function3<? super CopyActionContext, ? super Path, ? super Path, ? extends CopyActionResult> function3, Path path, Path path2, Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult> function32) {
|
||||
super(2, Intrinsics.Kotlin.class, "copy", "copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt(Lkotlin/jvm/functions/Function3;Ljava/nio/file/Path;Ljava/nio/file/Path;Lkotlin/jvm/functions/Function3;Ljava/nio/file/Path;Ljava/nio/file/attribute/BasicFileAttributes;)Ljava/nio/file/FileVisitResult;", 0);
|
||||
this.$copyAction = function3;
|
||||
this.$this_copyToRecursively = path;
|
||||
this.$target = path2;
|
||||
this.$onError = function32;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final FileVisitResult invoke(Path p02, BasicFileAttributes p12) {
|
||||
FileVisitResult copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt;
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
Intrinsics.checkNotNullParameter(p12, "p1");
|
||||
copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt = PathsKt__PathRecursiveFunctionsKt.copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt(this.$copyAction, this.$this_copyToRecursively, this.$target, this.$onError, p02, p12);
|
||||
return copyToRecursively$copy$PathsKt__PathRecursiveFunctionsKt;
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* renamed from: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$5$3, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public /* synthetic */ class AnonymousClass3 extends FunctionReferenceImpl implements Function2<Path, Exception, FileVisitResult> {
|
||||
final /* synthetic */ Function3<Path, Path, Exception, OnErrorResult> $onError;
|
||||
final /* synthetic */ Path $target;
|
||||
final /* synthetic */ Path $this_copyToRecursively;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public AnonymousClass3(Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult> function3, Path path, Path path2) {
|
||||
super(2, Intrinsics.Kotlin.class, Constants.IPC_BUNDLE_KEY_SEND_ERROR, "copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt(Lkotlin/jvm/functions/Function3;Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/lang/Exception;)Ljava/nio/file/FileVisitResult;", 0);
|
||||
this.$onError = function3;
|
||||
this.$this_copyToRecursively = path;
|
||||
this.$target = path2;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final FileVisitResult invoke(Path p02, Exception p12) {
|
||||
FileVisitResult copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt;
|
||||
Intrinsics.checkNotNullParameter(p02, "p0");
|
||||
Intrinsics.checkNotNullParameter(p12, "p1");
|
||||
copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt = PathsKt__PathRecursiveFunctionsKt.copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt(this.$onError, this.$this_copyToRecursively, this.$target, p02, p12);
|
||||
return copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(FileVisitorBuilder fileVisitorBuilder) {
|
||||
invoke2(fileVisitorBuilder);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(FileVisitorBuilder visitFileTree) {
|
||||
Intrinsics.checkNotNullParameter(visitFileTree, "$this$visitFileTree");
|
||||
visitFileTree.onPreVisitDirectory(new AnonymousClass1(copyAction, path, target, onError));
|
||||
visitFileTree.onVisitFile(new AnonymousClass2(copyAction, path, target, onError));
|
||||
visitFileTree.onVisitFileFailed(new AnonymousClass3(onError, path, target));
|
||||
final Function3<Path, Path, Exception, OnErrorResult> function3 = onError;
|
||||
final Path path2 = path;
|
||||
final Path path3 = target;
|
||||
visitFileTree.onPostVisitDirectory(new Function2<Path, IOException, FileVisitResult>() { // from class: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$5.4
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
{
|
||||
super(2);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final FileVisitResult invoke(Path directory, IOException iOException) {
|
||||
FileVisitResult copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt;
|
||||
Intrinsics.checkNotNullParameter(directory, "directory");
|
||||
if (iOException == null) {
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt = PathsKt__PathRecursiveFunctionsKt.copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt(function3, path2, path3, directory, iOException);
|
||||
return copyToRecursively$error$PathsKt__PathRecursiveFunctionsKt;
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1, (Object) null);
|
||||
return target;
|
||||
}
|
||||
throw new NoSuchFileException(path.toString(), target.toString(), "The source file doesn't exist.");
|
||||
}
|
||||
|
||||
public static /* synthetic */ Path copyToRecursively$default(Path path, Path path2, Function3 function3, final boolean z3, Function3 function32, int i, Object obj) {
|
||||
if ((i & 2) != 0) {
|
||||
function3 = new Function3() { // from class: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$3
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final Void invoke(Path path3, Path path4, Exception exception) {
|
||||
Intrinsics.checkNotNullParameter(path3, "<anonymous parameter 0>");
|
||||
Intrinsics.checkNotNullParameter(path4, "<anonymous parameter 1>");
|
||||
Intrinsics.checkNotNullParameter(exception, "exception");
|
||||
throw exception;
|
||||
}
|
||||
};
|
||||
}
|
||||
if ((i & 8) != 0) {
|
||||
function32 = new Function3<CopyActionContext, Path, Path, CopyActionResult>() { // from class: kotlin.io.path.PathsKt__PathRecursiveFunctionsKt$copyToRecursively$4
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
{
|
||||
super(3);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final CopyActionResult invoke(CopyActionContext copyActionContext, Path src, Path dst) {
|
||||
Intrinsics.checkNotNullParameter(copyActionContext, "$this$null");
|
||||
Intrinsics.checkNotNullParameter(src, "src");
|
||||
Intrinsics.checkNotNullParameter(dst, "dst");
|
||||
return copyActionContext.copyToIgnoringExistingDirectory(src, dst, z3);
|
||||
}
|
||||
};
|
||||
}
|
||||
return copyToRecursively(path, path2, (Function3<? super Path, ? super Path, ? super Exception, ? extends OnErrorResult>) function3, z3, (Function3<? super CopyActionContext, ? super Path, ? super Path, ? extends CopyActionResult>) function32);
|
||||
}
|
||||
|
||||
@ExperimentalPathApi
|
||||
private static final FileVisitResult toFileVisitResult$PathsKt__PathRecursiveFunctionsKt(OnErrorResult onErrorResult) {
|
||||
int i = WhenMappings.$EnumSwitchMapping$1[onErrorResult.ordinal()];
|
||||
if (i == 1) {
|
||||
return FileVisitResult.TERMINATE;
|
||||
}
|
||||
if (i == 2) {
|
||||
return FileVisitResult.SKIP_SUBTREE;
|
||||
}
|
||||
throw new NoWhenBranchMatchedException();
|
||||
}
|
||||
}
|
||||
1031
apk_decompiled/sources/kotlin/io/path/PathsKt__PathUtilsKt.java
Normal file
1031
apk_decompiled/sources/kotlin/io/path/PathsKt__PathUtilsKt.java
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user