Conversation

rektide

Start a draft, towards implementing #28.

Currently utterly untested. 馃檭

const handle = await dir.getFileHandle(filename)
const file = await handle.getFile()
const mtimeMs = file.lastModified
// NEEDED: https://.com/whatwg/fs/issues/12
Copy link
Author

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

Comment on lines +237 to +238
// classic File API only, WANTED: https://.com/whatwg/fs/pull/9
await dir.removeEntry(filename)
Copy link
Author

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.

Comment on lines +293 to +294
async rename(oldFilepath, newFilepath) {
// WANTED: https://.com/whatwg/fs/pull/10
Copy link
Author

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

Comment on lines +324 to +326
async readlink(filepath, opts) {
// NEEDED: https://.com/whatwg/fs/issues/54
throw new Error("Insufficient web standards for readlink");
Copy link
Author

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).

Comment on lines +342 to +344
async watch() {
// NEEDED: https://.com/WICG/file-system-access/issues/72
throw new Error("Insufficient web standards for watch")
Copy link
Author

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://.com/whatwg/fs/issues/12
Copy link
Author

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

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

@rektide