mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 02:41:49 -05:00
android: Convert MinimalDocumentFile to Kotlin
This commit is contained in:
parent
9e8ab499dc
commit
b5819594ba
2 changed files with 8 additions and 28 deletions
|
@ -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