Skip to content

FileSystemObserverObserveOptions should have an option like initialUpdate #170

@htho

Description

@htho

What is the issue with the File System Standard?

I want to render a directory tree, and update it, when there are relevant changes in the file-system.

I use window.showDirectoryPicker to get a FileSystemDirectoryHandle.
To render the initial tree I need to recursively walk the tree, to get all the entries.
After that I use the updates from the FileSystemObserver to update my tree.

Since I needed to implement the update mechanism anyway, I wrote a method that generates "fake" appeared-FileSystemChangeRecords for all the entries down the tree.
Then I call the my update method with those "fake" updates.

Since this is a common task, it would be good to have an additional option in FileSystemObserverObserveOptions like initialUpdate, that calls the FileSystemObserverCallback with all appeared-FileSystemChangeRecords needed to create the actual tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions