android: Convert MinimalDocumentFile to Kotlin

This commit is contained in:
Charles Lombardo 2023-03-08 15:38:56 -05:00 committed by bunnei
parent 9e8ab499dc
commit b5819594ba
2 changed files with 8 additions and 28 deletions

View file

@ -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);
}
}

View file

@ -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
}