-
Notifications
You must be signed in to change notification settings - Fork 48
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
initial draft backend for File System specification with Access Handles #103
base: main
Are you sure you want to change the base?
Conversation
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would love to see whatwg/fs#12 for better file metadata so we could support more of this
// classic File API only, WANTED: https://github.com/whatwg/fs/pull/9 | ||
await dir.removeEntry(filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a PR for SyncAccessHandles to get a remove
, whatwg/fs#9.
async rename(oldFilepath, newFilepath) { | ||
// WANTED: https://github.com/whatwg/fs/pull/10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a PR for access handle landing a move
, whatwg/fs#10
async readlink(filepath, opts) { | ||
// NEEDED: https://github.com/whatwg/fs/issues/54 | ||
throw new Error("Insufficient web standards for readlink"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would love to see whatwg/fs#54 so we could support link handling (see also symlink
below).
async watch() { | ||
// NEEDED: https://github.com/WICG/file-system-access/issues/72 | ||
throw new Error("Insufficient web standards for watch") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would love to see WICG/file-system-access#72 for watches so we could support this.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unknown how much further we could get with whatwg/fs#12 but hopefully further
Start a draft, towards implementing #28.
Currently utterly untested. 🙃