PSA: Exclusive lock on removeEntry() in File System Access API

Skip to first unread message

Daseul Lee

Nov 21, 2022, 2:39:12 PM11/21/22
to blink-dev, Austin Sullivan

Hello blink-dev,

Contact emails,



FileSystemAccessDirectoryHandle.removeEntry() currently takes a shared lock, and we plan on changing it to take an exclusive lock.

With a shared lock, a file entry can be removed from a directory while there is an open FileSystemWritableFileStream. This is the result of underspecification of removeEntry(), which was added before the concept of locking was introduced to File System Access API. By changing to the exclusive lock, removeEntry() will not be allowed when there is an open writable; similarly, any operation that requires an exclusive lock to the handle will not be allowed until removeEntry() is completed. This is consistent with other file-modifying operations like move() and remove(), which already take an exclusive lock.

Tracking Bug

Reply all
Reply to author
0 new messages