Intent to Implement and Ship: Seeking past the end of a file in the File System Access API

104 views
Skip to first unread message

Austin Sullivan

unread,
Jan 28, 2021, 12:25:17 PMJan 28
to blin...@chromium.org, Marijn Kruisselbrink

Contact emails

asu...@chromium.org, mek@chromium.org 


Explainer


https://github.com/WICG/file-system-access/pull/266


Specification

https://github.com/WICG/file-system-access/pull/266/files 


Summary

Rather than rejecting when trying to write past the end of a file, require extending a file with some number of 0x00 (NUL) bytes instead.


This enables creating sparse files and greatly simplifies saving content to a file when the data to be written is received out of order.



Blink component

Blink>Storage>FileSystem


Motivation

This will let websites provide more user friendly user experiences when interacting with the File System Access API.



TAG review

https://github.com/w3ctag/design-reviews/issues/600


TAG review status

TAG is supportive of this change.


Risks



Interoperability and Compatibility


Gecko: Pending on the File System Access API as a whole (https://github.com/mozilla/standards-positions/issues/154), this seemed too small to justify reaching out separately.


Edge: No signal


WebKit: Negative on the File System Access API as a whole (https://lists.webkit.org/pipermail/webkit-dev/2020-August/031362.html), this seemed too small to justify reaching out separately.


Web developers: Positive (https://github.com/WICG/file-system-access/issues/262)



Is this feature fully tested by web-platform-tests?

No


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/6556060494069760


This intent message was generated by Chrome Platform Status.

Chris Harrelson

unread,
Jan 28, 2021, 3:33:40 PMJan 28
to Austin Sullivan, blink-dev, Marijn Kruisselbrink
LGTM1

On Thu, Jan 28, 2021 at 9:25 AM Austin Sullivan <asu...@chromium.org> wrote:

Contact emails

asu...@chromium.org, mek@chromium.org 


Explainer


https://github.com/WICG/file-system-access/pull/266


Specification

https://github.com/WICG/file-system-access/pull/266/files 


Summary

Rather than rejecting when trying to write past the end of a file, require extending a file with some number of 0x00 (NUL) bytes instead.


This enables creating sparse files and greatly simplifies saving content to a file when the data to be written is received out of order.



Blink component

Blink>Storage>FileSystem


Motivation

This will let websites provide more user friendly user experiences when interacting with the File System Access API.



TAG review

https://github.com/w3ctag/design-reviews/issues/600


TAG review status

TAG is supportive of this change.


Risks



Interoperability and Compatibility


Gecko: Pending on the File System Access API as a whole (https://github.com/mozilla/standards-positions/issues/154), this seemed too small to justify reaching out separately.


Edge: No signal


There is no longer an Edge signals part of the process, did you use an old template?
 

WebKit: Negative on the File System Access API as a whole (https://lists.webkit.org/pipermail/webkit-dev/2020-August/031362.html), this seemed too small to justify reaching out separately.


Web developers: Positive (https://github.com/WICG/file-system-access/issues/262)



Is this feature fully tested by web-platform-tests?

No


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/6556060494069760


This intent message was generated by Chrome Platform Status.

--
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+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADs-7rEUaDH6fM0qXohbhPU_-6ohehgYAef3Msz8VYfCGdmPCQ%40mail.gmail.com.

Marijn Kruisselbrink

unread,
Jan 28, 2021, 3:53:27 PMJan 28
to Chris Harrelson, Austin Sullivan, blink-dev
It seems Edge was added back to the template in https://github.com/GoogleChrome/chromium-dashboard/pull/1116, not sure why...

yo...@yoav.ws

unread,
Feb 4, 2021, 3:32:37 AMFeb 4
to blink-dev, Marijn Kruisselbrink, Austin Sullivan, blink-dev, Chris Harrelson
LGTM2

Manuel Rego Casasnovas

unread,
Feb 4, 2021, 3:52:46 AMFeb 4
to yo...@yoav.ws, blink-dev, Marijn Kruisselbrink, Austin Sullivan, Chris Harrelson
LGTM3.

On 04/02/2021 09:32, yo...@yoav.ws wrote:
> LGTM2
>
> On Thursday, January 28, 2021 at 9:53:27 PM UTC+1 Marijn Kruisselbrink
> wrote:
>
> On Thu, Jan 28, 2021 at 12:33 PM Chris Harrelson
> <chri...@chromium.org> wrote:
>
> LGTM1
>
> On Thu, Jan 28, 2021 at 9:25 AM Austin Sullivan
> <asu...@chromium.org> wrote:
>
>
> Contact emails
>
> asu...@chromium.org, m...@chromium.org 
>
>
> Explainer
>
>
> https://github.com/WICG/file-system-access/pull/266
> <https://github.com/WICG/file-system-access/pull/266>
>
>
> Specification
>
> https://github.com/WICG/file-system-access/pull/266/files
> <https://github.com/WICG/file-system-access/pull/266/files
>
>
> Summary
>
> Rather than rejecting when trying to write past the end of a
> file, require extending a file with some number of 0x00
> (NUL) bytes instead.
>
>
> This enables creating sparse files and greatly simplifies
> saving content to a file when the data to be written is
> received out of order.
>
>
>
> Blink component
>
> Blink>Storage>FileSystem
> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EStorage%3EFileSystem>
>
>
> Motivation
>
> This will let websites provide more user friendly user
> experiences when interacting with the File System Access API.
>
>
>
> TAG review
>
> https://github.com/w3ctag/design-reviews/issues/600
> <https://github.com/w3ctag/design-reviews/issues/600>
>
>
> TAG review status
>
> TAG is supportive of this change.
>
>
> Risks
>
>
>
> Interoperability and Compatibility
>
>
> Gecko: Pending on the File System Access API as a whole
> (https://github.com/mozilla/standards-positions/issues/154
> <https://github.com/mozilla/standards-positions/issues/154>), this
> seemed too small to justify reaching out separately.
>
>
> Edge: No signal
>
>
> There is no longer an Edge signals part of the process, did you
> use an old template?
>
>
> It seems Edge was added back to the template
> in https://github.com/GoogleChrome/chromium-dashboard/pull/1116
> <https://github.com/GoogleChrome/chromium-dashboard/pull/1116>, not
> sure why...
>  
>
>  
>
>
> WebKit: Negative on the File System Access API as a whole
> (https://lists.webkit.org/pipermail/webkit-dev/2020-August/031362.html
> <https://lists.webkit.org/pipermail/webkit-dev/2020-August/031362.html>),
> this seemed too small to justify reaching out separately.
>
>
> Web developers: Positive
> (https://github.com/WICG/file-system-access/issues/262
> <https://github.com/WICG/file-system-access/issues/262>)
>
>
>
> Is this feature fully tested by web-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
>
> No
>
>
> Link to entry on the Chrome Platform Status
>
> https://www.chromestatus.com/feature/6556060494069760
> <https://www.chromestatus.com/feature/6556060494069760>
>
>
> This intent message was generated by Chrome Platform Status
> <https://www.chromestatus.com/>.
>
> --
> 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+...@chromium.org.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADs-7rEUaDH6fM0qXohbhPU_-6ohehgYAef3Msz8VYfCGdmPCQ%40mail.gmail.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADs-7rEUaDH6fM0qXohbhPU_-6ohehgYAef3Msz8VYfCGdmPCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> 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+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/47b35a99-4cda-45a2-a480-60c9ac217a65n%40chromium.org
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/47b35a99-4cda-45a2-a480-60c9ac217a65n%40chromium.org?utm_medium=email&utm_source=footer>.

Daniel Bratell

unread,
Feb 4, 2021, 2:40:14 PMFeb 4
to Manuel Rego Casasnovas, yo...@yoav.ws, blink-dev, Marijn Kruisselbrink, Austin Sullivan, Chris Harrelson
Just curious, what happens if someone tries to exploit this by writing
very far ahead?

/Daniel

Austin Sullivan

unread,
Feb 4, 2021, 4:31:14 PMFeb 4
to Daniel Bratell, Manuel Rego Casasnovas, yo...@yoav.ws, blink-dev, Marijn Kruisselbrink, Chris Harrelson
Great question, Daniel. This was brought up in the GitHub issue which requested this feature (https://github.com/WICG/file-system-access/issues/262#issuecomment-771601594). I'll quote the response by mek@:

Behavior wise it should be no different than calling truncate with a very large size to resize the file. For files in the origin private file system either operation will fail with a quota exceeded error (since the empty space is still counted against quota). For files on the local file system, I imagine it does indeed depend on the underlying file system implementation. It is my understanding that pretty much every major file system today supports sparse files transparently (ntfs, apfs, and most linux file systems), although I haven't tested how exactly they behave. I don't think this will reveal more of the underlying system then other operations already do.

Joe Medley

unread,
Feb 22, 2021, 11:27:05 AMFeb 22
to Austin Sullivan, blink-dev, Marijn Kruisselbrink
Is this really only on desktop?
Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.


On Thu, Jan 28, 2021 at 9:25 AM Austin Sullivan <asu...@chromium.org> wrote:
--
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+...@chromium.org.
Reply all
Reply to author
Forward
0 new messages