Skip to content

File missing in the path from PlatformFile #194

Open
@OlehSalamakha

Description

Here is my scenario.
Open File Picker -> Select File -> receive platform file -> call platform specific func on Android to check if file exists:

 val launcher = rememberFilePickerLauncher(mode = PickerMode.Single, type = PickerType.Image) { file ->
    checkIfFileExists(file?.path)
}


fun checkIfFileExists(path: String?) {

val file = File(path)
println(file.exists())
}

Path from platform file looks like this /data/user/0/my_package/files/1000015890.jpg.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions