shared-storage icon indicating copy to clipboard operation
shared-storage copied to clipboard

Can we change the methods to take folder/file paths rather than URIs?

Open heygarvish opened this issue 1 year ago • 3 comments

If we can't change then what are the possible ways to convert folder/file paths to URIs?

It's worth it because I guess paths are easy to deal with (correct me if I'm wrong).

Thanks by the way. Your plugin saved my day. Just wanna tell you that you're doing awesome work by keeping this repository active. You inspire us all ❤️

heygarvish avatar Jun 27 '23 16:06 heygarvish

Currently there is no way to convert path to URIs and vice-versa.

I plan to add some improvements in the future to handle paths AND uris to make the library easier to use (so you'll not need to worry about URIs, for you will be just File/Directories), but right know there is none :(

I've been busy lately but thanks to bring my attention to this, I'll check it out soon and release with other changes I've been working.

Thanks!

alexcmgit avatar Jun 27 '23 16:06 alexcmgit

The "Saf" flutter plugin has kind of managed to do so. I'm wondering how?

heygarvish avatar Jun 27 '23 16:06 heygarvish

[saf] is actually a fork of [shared_storage] that hides the URI part. But they are also handling with URIs, they just hide it inside the Saf class, see https://github.com/ivehement/saf/blob/master/lib/src/storage_access_framework/saf.dart.

But I didn't read the whole code, I need to take better look.

alexcmgit avatar Jun 27 '23 16:06 alexcmgit