~eliasnaur/gio

2

File System Access API

Details
Message ID
<CAN_L7j2NuXgtMd96YHe7ye6zBL3mmdsWYk6fN92GnexscUGuOA@mail.gmail.com>
DKIM signature
missing
Download raw message
Hey :)

Maybe add a mechanism to use the File System Access API in
https://github.com/gioui/gio-x/blob/main/explorer/explorer_js.js

April 2023: Since beginning of 2023, all modern browsers ship the File
System Access API which allows to persistently store data in the
browser with a way better performance.

OPFS

https://caniuse.com/native-filesystem-api

cheers

Gerard
Details
Message ID
<60fb5352-d84c-4ff4-b01c-ef0b1c4da513@app.fastmail.com>
In-Reply-To
<CAN_L7j2NuXgtMd96YHe7ye6zBL3mmdsWYk6fN92GnexscUGuOA@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
I have implemented support for File System Access API, at
gio-plugins[0], while ago.

I'll "backport" that to gio/x at some point. Also, make it compatible 
against Go 1.21 changes. I can't do that right now, because I'm at the 
end of the semester, I have a lot of work and exams. 😓

Also, I'm not sure if we should migrate to File System Access and 
drop support for the older one, or keep both. The major issue is iOS,
because Safari isn't "everygreen", it requires OS update to get an
new browser.

[0]: https://github.com/gioui-plugins/gio-plugins/blob/main/explorer/explorer_js.go#L31-L41

-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

On Thu, May 25, 2023, at 2:05 PM, Ged Wed wrote:
> Hey :)
>
> Maybe add a mechanism to use the File System Access API in
> https://github.com/gioui/gio-x/blob/main/explorer/explorer_js.js
>
> April 2023: Since beginning of 2023, all modern browsers ship the File
> System Access API which allows to persistently store data in the
> browser with a way better performance.
>
> OPFS
>
> https://caniuse.com/native-filesystem-api
>
> cheers
>
> Gerard
Details
Message ID
<858e90d3-5ad2-43ee-a663-cd9d9d012086@app.fastmail.com>
In-Reply-To
<60fb5352-d84c-4ff4-b01c-ef0b1c4da513@app.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Well... Safari doesn't support `showSaveFilePicker`, 
https://caniuse.com/?search=showSaveFilePicker.

Sounds like Safari only supports "Origin Private File System", which
is a subset of File System Access API. That API only allows the
website/origin to store contents, without user interaction

You can read more about that on https://developer.chrome.com/articles/origin-private-file-system/#the-user-visible-versus-the-origin-private-file-system. In general, that is a 
"file-based" version of Localstorage, you can access and
read files that is exclusive to the origin/website, and not
intended to be visible directly by the user. That is not
useful to explorer package.

_I'm assuming that "Can I Use" is correct, I didn't test that._

-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

On Thu, May 25, 2023, at 6:34 PM, Lucas Rodrigues wrote:
> I have implemented support for File System Access API, at
> gio-plugins[0], while ago.
>
> I'll "backport" that to gio/x at some point. Also, make it compatible 
> against Go 1.21 changes. I can't do that right now, because I'm at the 
> end of the semester, I have a lot of work and exams. 😓
>
> Also, I'm not sure if we should migrate to File System Access and 
> drop support for the older one, or keep both. The major issue is iOS,
> because Safari isn't "everygreen", it requires OS update to get an
> new browser.
>
> [0]: 
> https://github.com/gioui-plugins/gio-plugins/blob/main/explorer/explorer_js.go#L31-L41
>
> -- 
>   Lucas Rodrigues
>   inkeliz@inkeliz.com
>
> On Thu, May 25, 2023, at 2:05 PM, Ged Wed wrote:
>> Hey :)
>>
>> Maybe add a mechanism to use the File System Access API in
>> https://github.com/gioui/gio-x/blob/main/explorer/explorer_js.js
>>
>> April 2023: Since beginning of 2023, all modern browsers ship the File
>> System Access API which allows to persistently store data in the
>> browser with a way better performance.
>>
>> OPFS
>>
>> https://caniuse.com/native-filesystem-api
>>
>> cheers
>>
>> Gerard
Reply to thread Export thread (mbox)