Skip to content

[Draft] Win32 file API proposals (SYS-0010 through SYS-0018) - #392

Draft
jrflat wants to merge 3 commits into
apple:mainfrom
jrflat:win32-file-api-proposal-series
Draft

jrflat wants to merge 3 commits into
apple:mainfrom
jrflat:win32-file-api-proposal-series

Conversation

@jrflat

@jrflat jrflat commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Propose Windows-native file system API for System, built on the Win32 base API and HANDLE rather than the C runtime's POSIX compatibility layer that backs FileDescriptor. This series aims to bring System's Windows support up to par with its POSIX counterpart.

The surface is split into nine staged proposals:

Proposal API Pitch PR
SYS-0010 A Win32 namespace and Win32Error link #394
SYS-0011 Win32.FileHandle: ownership and closing
SYS-0012 Opening files and directories, duplication, and reopening
SYS-0013 FileDescriptor bridging for Win32.FileHandle
SYS-0014 File I/O: read, write, seek, flush, truncate
SYS-0015 Win32.FileType
SYS-0016 Byte-range locking
SYS-0017 Volume information for a handle
SYS-0018 Final path name for a handle

Most are independently reviewable, but may depend on earlier proposals (especially the Win32 namespace, error, and Win32.FileHandle) for their ultimate spelling. I'll use this draft PR as a way to show, track, and collect feedback on the entire surface. Each proposal will also get its own forums pitch and PR, starting with the Win32 namespace and Win32.FileHandle. Inline comments are welcome here, or on a proposal's own PR once it's pitched; broader design discussion is best for the forums threads.

Feedback is very much appreciated!

Propose Windows-native file system API for System, built on the Win32
base API and HANDLE rather than the C runtime's POSIX compatibility
layer that backs FileDescriptor.

The surface is split into nine staged proposals:

  SYS-0010  A Win32 namespace and Win32.Error
  SYS-0011  Win32.FileHandle: ownership and closing
  SYS-0012  Opening files and directories, duplication, and reopening
  SYS-0013  FileDescriptor bridging for Win32.FileHandle
  SYS-0014  File I/O: read, write, seek, flush, truncate
  SYS-0015  Win32.FileType
  SYS-0016  Byte-range locking
  SYS-0017  Volume information for a handle
  SYS-0018  Final path name for a handle
…y the synthesized code's bits and how wrappers can throw `.success`. Add `NTStatus` to **Future directions**.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant