Skip to content

src: expose Windows-only fs open flags - #64775

Open
PickBas wants to merge 1 commit into
nodejs:mainfrom
JaneaSystems:win-new-constants
Open

src: expose Windows-only fs open flags#64775
PickBas wants to merge 1 commit into
nodejs:mainfrom
JaneaSystems:win-new-constants

Conversation

@PickBas

@PickBas PickBas commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

src: expose Windows-only fs open flags

libuv honors several Windows-only open flags but Node never exported the constants, so they were unreachable from fs.open(). Expose UV_FS_O_TEMPORARY, UV_FS_O_SHORT_LIVED, UV_FS_O_SEQUENTIAL and UV_FS_O_RANDOM under the UV_FS_O_ prefix, matching the existing UV_FS_O_FILEMAP. They are 0 on non-Windows platforms.

UV_FS_O_TEMPORARY deletes the file when the last handle closes, UV_FS_O_SHORT_LIVED avoids flushing a throwaway file to disk, and UV_FS_O_SEQUENTIAL/UV_FS_O_RANDOM hint the access pattern to optimize caching.

Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Jul 27, 2026
@PickBas
PickBas force-pushed the win-new-constants branch from 3fb62df to 23c32f5 Compare July 27, 2026 07:43
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.15%. Comparing base (874e96e) to head (23c32f5).
⚠️ Report is 105 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64775      +/-   ##
==========================================
- Coverage   90.24%   90.15%   -0.09%     
==========================================
  Files         739      744       +5     
  Lines      241676   242522     +846     
  Branches    45544    45694     +150     
==========================================
+ Hits       218102   218653     +551     
- Misses      15101    15359     +258     
- Partials     8473     8510      +37     
Files with missing lines Coverage Δ
src/node_constants.cc 99.71% <100.00%> (+<0.01%) ⬆️

... and 126 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants