From 0067917b7c94baf92118e90cbd5c120f790762f0 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 350555f2f8ad99..b0b57335f1df99 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2849,6 +2849,9 @@ behavior is similar to `cp dir1/ dir2/`.