Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

An initial option, like chokidar, would be nice #182

@nono

Description

@nono

Prerequisites

Description

chokidar sends add events for files and directories viewed on the initial scan. There is an option ignoreInitial to avoid doing it. It'd be nice to have an initial option for @atom/watcher to do the default behavior of chokidar on this aspect. It's particularly useful on linux where the watcher is already browsing the tree to tell inotify what directories to watch, as it would avoid to have to do it again outside of the watcher (it would costs more syscalls and introduces risk of race conditions).

Steps to Reproduce

  1. const w = await watcher.watchPath('/var/log', { initial: true }, events => { /* ... */ })
  2. [and so on...]

Expected behavior:

It sends an event for the existing files and directories inside /var/log.

Actual behavior:

Nothing currently.

Versions

Master

Additional Information

It's a suggestion of an improvement, not a bug report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions