Skip to content

Creating a subdirectory under a directory picked with directory picker results in error #550

@Subfly

Description

@Subfly

Hi, first of all thank you so much for this amazing library.

I have an issue where, when I select a directory with directory picker and then try to create subfolders, it always results in this error:

io.github.vinceglb.filekit.exceptions.FileKitUriPathNotSupportedException: Uri-based PlatformFile does not have a Path representation

I don't think the issue is with the SAF as the picker already allow us to give permissions for the selected directory.

For more context, what I want to achieve is allowing users to export note content, and these notes can have assets. I need to create a folder with the title of the note and as soon as I do:

val directory = FileKit.openDirectoryPicker(
       directory = null,
       dialogSettings = emptyTitleSettings, // default settings actually...
)

val saveDir = directory / noteTitle
saveDir.createDirectories()

I get the error above.

Maybe I am doing something wrong, but I can't come up with a any solution for that issue. Any help appreciated, or hope it can be a solvable bug.

Thanks in advance.

Info:

  • FileKit version: 0.13.0
  • Android version: 16
  • Tested on Pixel 9a

Metadata

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