From b5819594ba7d5f0328a1227f486e324eea057703 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Wed, 8 Mar 2023 15:38:56 -0500 Subject: android: Convert MinimalDocumentFile to Kotlin --- .../yuzu/yuzu_emu/model/MinimalDocumentFile.java | 28 ---------------------- .../org/yuzu/yuzu_emu/model/MinimalDocumentFile.kt | 8 +++++++ 2 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 src/android/app/src/main/java/org/yuzu/yuzu_emu/model/MinimalDocumentFile.java create mode 100644 src/android/app/src/main/java/org/yuzu/yuzu_emu/model/MinimalDocumentFile.kt (limited to 'src/android') diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/MinimalDocumentFile.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/MinimalDocumentFile.java deleted file mode 100644 index 4ec001a7f..000000000 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/MinimalDocumentFile.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.yuzu.yuzu_emu.model; - -import android.net.Uri; -import android.provider.DocumentsContract; - -public class MinimalDocumentFile { - private final String filename; - private final Uri uri; - private final String mimeType; - - public MinimalDocumentFile(String filename, String mimeType, Uri uri) { - this.filename = filename; - this.mimeType = mimeType; - this.uri = uri; - } - - public String getFilename() { - return filename; - } - - public Uri getUri() { - return uri; - } - - public boolean isDirectory() { - return mimeType.equals(DocumentsContract.Document.MIME_TYPE_DIR); - } -} diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/MinimalDocumentFile.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/MinimalDocumentFile.kt new file mode 100644 index 000000000..2e4acb2be --- /dev/null +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/MinimalDocumentFile.kt @@ -0,0 +1,8 @@ +package org.yuzu.yuzu_emu.model + +import android.net.Uri +import android.provider.DocumentsContract + +class MinimalDocumentFile(val filename: String, mimeType: String, val uri: Uri) { + val isDirectory: Boolean = mimeType == DocumentsContract.Document.MIME_TYPE_DIR +} -- cgit v1.2.3