mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-27 21:46:44 +00:00
android: Convert MinimalDocumentFile to Kotlin
This commit is contained in:
parent
9e8ab499dc
commit
b5819594ba
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
Loading…
Reference in a new issue