Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno.watchFs - move and remove events not triggered #6192

Closed
saurabhdiwanji opened this issue Nov 18, 2024 · 1 comment
Closed

Deno.watchFs - move and remove events not triggered #6192

saurabhdiwanji opened this issue Nov 18, 2024 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@saurabhdiwanji
Copy link

Description
When using Deno.watchFs to monitor a folder for file system changes, the events for move and remove operations on files are not captured. However, other events such as create, modify, and rename work as expected.

Code Example

const watcher = Deno.watchFs('./in/'); 

for await (const e of watcher) {
  console.log(`>>> event`, e); 
}

Steps to Reproduce

  1. Create a folder .\in\ and add a test file (e.g., test01.txt) using the following PowerShell command.
    New-Item -ItemType File -Path .\in\test01.txt

  2. Perform one of the following actions

    • Move the file test01.txt to a different location using the File Explorer or the following PowerShell command:
      Move-Item -Path .\in\test01.txt -Destination .\out\
    • Remove the file test01.txt using the following PowerShell command:
      rm .\in\test01.txt
  3. Observe the behavior of Deno.watchFs in the console output.

Expected Behavior
The Deno.watchFs API should emit an event for move and remove operations on files in the watched folder.

Actual Behavior
No event is triggered for move or remove operations, even though other events such as create, modify, and rename are correctly captured.

Environment

  • OS: Windows 10
  • Deno version: 2.0.6
  • std version: 1 (perhaps not sure how to check).
@kt3k
Copy link
Member

kt3k commented Nov 18, 2024

Thanks for your report! But let's track it on denoland/deno#26906

@kt3k kt3k closed this as completed Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants