Skip to content

fs.watch not work when I try to watch drive root #28917

Description

@Leaking
  • Version: v12.7.0

  • Platform: Darwin QUINNHZCHEN-MB0 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64

  • Subsystem:

const fs = require('fs')
fs.watch('/', { recursive: true }, (event, filename) => {
  console.log(`watch event ${event} filename = ${filename}`)
})

i try to watch my filesystem device root, it works when I use node v10.15.0. but when i upgrade to node v 12.7.0. the fs.watch not work, i can't receive any events

it seems that fs.watch work on any path except the root path under node v 12.7.0 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.macosIssues and PRs related to the macOS platform / OSX.questionIssues that look for answers.

    Type

    No type

    Fields

    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