Skip to content

fs.watchFile calling listener on non-existing files #1745

Description

@kanongil

fs.watchFile is supposed to call the listener when the file attributes change. If I call it using a non-existing path, the listener is immediately fired for some reason.

In node 0.10, it would wait until the file exists before calling the listener. The current functionality does however match node 0.12 behavior, which I filed an issue again here: nodejs/node-v0.x-archive#25345.

Activity

  1. added
    fsIssues and PRs related to file-system APIs and the fs module.
    on May 20, 2015
  2. brendanashworth commented on Jun 7, 2015

    @brendanashworth
    Contributor

    There is a fix pending here: nodejs/node-v0.x-archive#25469

  3. brendanashworth commented on Jul 1, 2015

    @brendanashworth
    Contributor

    @kanongil according to some discussion (#2028 (comment)), some believe that this should be the correct functionality. Do you have an opinion on that?

  4. thefourtheye commented on Jul 19, 2015

    @thefourtheye
    Contributor

    @kanongil As per the discussion here, the current behaviour is preferred. And the doc improvement is done in #2093 and #2169. Please feel free to review them and suggest changes. I am closing this issue now. Please leave a comment if you strongly feel that this has to be reopened and discussed further. Thanks :-)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to file-system APIs and the fs module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions