Yes, we use dirHandle.getFileHandle(name, { create: true }). We use that to
create new files in the chosen folder. That is fundamental to how our PWA
saves data in folders (and I'd have thought fundamental to the use of a
directory picker).

On Wed, 30 Oct 2024 at 08:40, Joel Hockey <joelhoc...@chromium.org> wrote:

> I've got fixes for mime-types and save-as.
>
> Ashley, I tried out the app and saw how it fails for "save as project
> folder".  I haven't looked at the JS code you have, but I'm guessing that
> the problem is that the android implementation of FileSystemHandle is
> missing some features such as
> dirHandle.getFileHandle(name, {create: true})
>
> https://fs.spec.whatwg.org/#dom-filesystemdirectoryhandle-getfilehandle
>
> Android uses content-URIs for file paths, which don't work the same as
> posix paths where you can append files inside a parent dir.  I'll take a
> look at this more and see what we can do, but a lot of things in android
> depend on both the APIs available and which file providers have implemented
> them and how.
>
> Can you confirm if you are using getFileHandle() or if you are able to
> detect which specific call is failing?
>
> On Tue, Oct 29, 2024 at 9:00 PM Thomas Steiner <to...@google.com> wrote:
>
>> Re 'save as folder': yes, it's just showDirectoryPicker({ mode:
>>> "readwrite" }). We just describe that as "save as" in our own UI (as it
>>> basically means "choose the location with a dialog"). My main point is that
>>> things that work on desktop Chrome aren't currently working on Android.
>>>
>>
>> Gotcha, thanks for the clarification. So it was as I expected… :-) You
>> didn't magically discover `showSave*Directory*Picker()`, which,
>> actually, is a feature request
>> <https://github.com/WICG/file-system-access/issues/431>. Apart from the
>> semantically confusing Open vs. Save in the UI (below on macOS), your
>> workaround actually gets us more than half-way there…
>>
>> [image: Screenshot 2024-10-29 at 11.58.00.png]
>> [image: Screenshot 2024-10-29 at 11.58.17.png]
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAABs73i39OZpMQyhM9hC5zgdw0B0fs2OQhJxWn9Yc%2B9adWh36w%40mail.gmail.com.

Reply via email to