From 656cfaeb2d54000aa6e9b0abd6e469f0fe217d2d Mon Sep 17 00:00:00 2001 From: Kirill Saied Date: Thu, 6 Aug 2026 23:24:40 +0200 Subject: [PATCH] fs: add windowsHandle option to file streams Fixes: https://github.com/nodejs/node/issues/57288 Signed-off-by: PickBas PR-URL: https://github.com/nodejs/node/pull/63851 Reviewed-By: Stefan Stojanovic --- doc/api/fs.md | 22 +++++++ lib/internal/fs/streams.js | 38 +++++++++++- src/node_file.cc | 34 ++++++++++ test/addons/fs-windows-handle/binding.cc | 62 +++++++++++++++++++ test/addons/fs-windows-handle/binding.gyp | 9 +++ test/addons/fs-windows-handle/test.js | 35 +++++++++++ .../parallel/test-fs-stream-windows-handle.js | 47 ++++++++++++++ 7 files changed, 245 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 c7ee7c12ada..70a3e7420bd 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2933,6 +2933,9 @@ behavior is similar to `cp dir1/ dir2/`.