From 329b98f67bca609387dd9070074dec3adc8a0a8c Mon Sep 17 00:00:00 2001 From: PickBas Date: Thu, 11 Jun 2026 15:50:15 +0200 Subject: [PATCH 1/2] fs: add windowsHandle option to file streams Fixes: https://github.com/nodejs/node/issues/57288 Signed-off-by: PickBas --- doc/api/fs.md | 22 +++++++ lib/internal/fs/streams.js | 35 +++++++++- src/node_file.cc | 29 +++++++++ test/addons/fs-windows-handle/binding.cc | 64 +++++++++++++++++++ test/addons/fs-windows-handle/binding.gyp | 9 +++ test/addons/fs-windows-handle/test.js | 35 ++++++++++ .../parallel/test-fs-stream-windows-handle.js | 42 ++++++++++++ 7 files changed, 234 insertions(+), 2 deletions(-) create mode 100644 test/addons/fs-windows-handle/binding.cc create mode 100644 test/addons/fs-windows-handle/binding.gyp create mode 100644 test/addons/fs-windows-handle/test.js create mode 100644 test/parallel/test-fs-stream-windows-handle.js diff --git a/doc/api/fs.md b/doc/api/fs.md index b02c337a6abe..420e501a493a 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2944,6 +2944,9 @@ behavior is similar to `cp dir1/ dir2/`.