Skip to content

fs.watch on windows prevents directory being deleted cleanly #9394

@xsq007

Description

@xsq007
  • Version: 6.5.0
  • Platform: Windows 10 (64-bit)
  • Subsystem: filesystem

I use fs.watch to build a tool to watch file changes.
Now there is a large directory which contains hundreds of subdirectories and files.
When trying to remove this directory with Shift+Delete keys, I found only some subdirectories and files had been removed.
Need to fully clean the directory with Shift+Delete key many times.
It is not good to clean large directory in such a way.

Someone told me it is related with file locking mechanism in Windows, but not know the detail.
Wondering if there is any way to avoid such issue, i.e. clean the large directory watched by fs.watch with only one Shift+Delete keys.

Any suggestions and clues are appreciated. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions