initial draft backend for File System specification with Access Handles#103
Draft
rektide wants to merge 2 commits intoisomorphic-git:mainfrom
Draft
initial draft backend for File System specification with Access Handles#103rektide wants to merge 2 commits intoisomorphic-git:mainfrom
rektide wants to merge 2 commits intoisomorphic-git:mainfrom
Conversation
rektide
commented
Oct 2, 2022
src/WhatFsBackend.js
Outdated
| const handle = await dir.getFileHandle(filename) | ||
| const file = await handle.getFile() | ||
| const mtimeMs = file.lastModified | ||
| // NEEDED: https://github.com/whatwg/fs/issues/12 |
Author
There was a problem hiding this comment.
would love to see whatwg/fs#12 for better file metadata so we could support more of this
rektide
commented
Oct 2, 2022
Comment on lines
+237
to
+238
| // classic File API only, WANTED: https://github.com/whatwg/fs/pull/9 | ||
| await dir.removeEntry(filename) |
Author
There was a problem hiding this comment.
there's a PR for SyncAccessHandles to get a remove, whatwg/fs#9.
rektide
commented
Oct 2, 2022
Comment on lines
+293
to
+294
| async rename(oldFilepath, newFilepath) { | ||
| // WANTED: https://github.com/whatwg/fs/pull/10 |
Author
There was a problem hiding this comment.
there's a PR for access handle landing a move, whatwg/fs#10
rektide
commented
Oct 2, 2022
Comment on lines
+324
to
+326
| async readlink(filepath, opts) { | ||
| // NEEDED: https://github.com/whatwg/fs/issues/54 | ||
| throw new Error("Insufficient web standards for readlink"); |
Author
There was a problem hiding this comment.
would love to see whatwg/fs#54 so we could support link handling (see also symlink below).
rektide
commented
Oct 2, 2022
Comment on lines
+342
to
+344
| async watch() { | ||
| // NEEDED: https://github.com/WICG/file-system-access/issues/72 | ||
| throw new Error("Insufficient web standards for watch") |
Author
There was a problem hiding this comment.
would love to see WICG/file-system-access#72 for watches so we could support this.
rektide
commented
Oct 2, 2022
| const handle = await dir.getFileHandle(filename) | ||
| const file = await handle.getFile() | ||
| const mtimeMs = file.lastModified | ||
| // NEEDED: more metadata, https://github.com/whatwg/fs/issues/12 |
Author
There was a problem hiding this comment.
unknown how much further we could get with whatwg/fs#12 but hopefully further
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Start a draft, towards implementing #28.
Currently utterly untested. 🙃