whatwg / fs

File System Standard
https://fs.spec.whatwg.org/
Other
236 stars 19 forks source link

Require taking a lock to remove an entry #138

Open a-sully opened 1 year ago

a-sully commented 1 year ago

The removeEntry() algorithm currently does not lock the removed entry. This means that, for example, a file with an open FileSystemWritableFileStream may be removed... at least according to the spec. Chromium and Firefox both reject with a NoModificationAllowedError in this case (and FileSystemWritableFileStream is not implemented on Safari)

removeEntry() may remove either a file or a directory. Support for locking a directory is tracked in #137

This also applies to the remove() method, which is being specified in #9

a-sully commented 1 year ago

73 would fix this for removeEntry()