-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getFile() shouldn't require a copy of the underlying data #157
Comments
If it is a copy or a pointer should be unobservable, as long as the "snapshot state" behavior is such that if the file changes the File object becomes unreadable (which I think is the only reasonable behavior). But yes, the File API spec is missing the necessary hooks to properly specify this snapshotting behavior (which doesn't just effect this spec, but also things like IndexedDB). It is still somewhere down on my todo list to try to fix that... |
The concept of "snapshot state" also has some fraught edge cases if I remember correctly as it's not something file systems offer, but I agree that it's overall not a big issue. At least in practice. |
I think I may be experiencing one of these edge cases, which results in different behavior depending on the operating system. Some context: I'm using I suspect this may be because |
That sounds right. That is a good argument for attempting to find a better fix. |
It sounds like we’re talking about copy-on-write — wouldn’t this rely on the existence of something like a mutation event system (e.g. the one described in #123)? |
What is the issue with the File System Standard?
This might be shortcoming with the File API, but surely https://fs.spec.whatwg.org/#dom-filesystemfilehandle-getfile shouldn't actually copy the underlying data? It should just be a pointer.
The text was updated successfully, but these errors were encountered: