]> Cypherpunks repositories - gostls13.git/commit
os,syscall: pass file flags to CreateFile on Windows
authorqmuntal <quimmuntal@gmail.com>
Wed, 27 Aug 2025 09:18:47 +0000 (11:18 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 29 Aug 2025 14:25:08 +0000 (07:25 -0700)
commit252c9011255872e21284480754400f9be7d48bf9
treef458ffe782b06724ff5fccc5e0af771331c3780b
parent53515fb0a9e267d6040c1d8785fe51b1367e8d4d
os,syscall: pass file flags to CreateFile on Windows

Add support for FILE_FLAG_* constants in the flag argument of
os.OpenFile and syscall.Open on Windows.

Passing invalid flags will result in an error.

Updates #73676

Change-Id: Ie215a3dd14f0d74141533f0a07865a02a67a3846
Reviewed-on: https://go-review.googlesource.com/c/go/+/699415
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
doc/next/6-stdlib/99-minor/os/73676.md [new file with mode: 0644]
src/internal/syscall/windows/nonblocking_windows.go
src/internal/syscall/windows/types_windows.go
src/os/file_windows.go
src/os/os_windows_test.go
src/syscall/syscall_windows.go
src/syscall/types_windows.go