1
0
mirror of https://github.com/golang/go synced 2024-11-17 14:04:48 -07:00
go/src/os
qmuntal 0f0aa5d8a6 os,syscall: File.Stat to use file handle for directories on Windows
Updates syscall.Open to support opening directories via CreateFileW.

CreateFileW handles are more versatile than FindFirstFile handles.
They can be used in Win32 APIs like GetFileInformationByHandle and
SetFilePointerEx, which are needed by some Go APIs.

Fixes #52747
Fixes #36019

Change-Id: I26a00cef9844fb4abeeb18d2f9d854162a146651
Reviewed-on: https://go-review.googlesource.com/c/go/+/405275
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Patrik Nyblom <pnyb@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-14 19:47:59 +00:00
..
exec internal/godebug: define more efficient API 2022-11-14 15:19:57 +00:00
signal os/signal/internal/pty: use libc (not cgo) on macOS 2022-11-10 19:24:46 +00:00
testdata
user os/user: use libc (not cgo) on macOS 2022-11-11 04:31:34 +00:00
dir_darwin.go
dir_plan9.go
dir_unix.go
dir_windows.go os,syscall: File.Stat to use file handle for directories on Windows 2022-11-14 19:47:59 +00:00
dir.go
dirent_aix.go
dirent_dragonfly.go
dirent_freebsd.go
dirent_js.go
dirent_linux.go
dirent_netbsd.go
dirent_openbsd.go
dirent_solaris.go
endian_big.go
endian_little.go go, math, os, reflect: support standard library for loong64 2022-05-20 15:12:52 +00:00
env_test.go
env_unix_test.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
env.go
error_errno.go
error_plan9.go
error_posix.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
error_test.go
error_unix_test.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
error_windows_test.go
error.go os: delete unused errClosed 2022-09-06 16:57:58 +00:00
example_test.go
exec_plan9.go
exec_posix.go Revert "os: add handling of os.Interrupt for windows" 2022-04-04 15:12:26 +00:00
exec_unix_test.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
exec_unix.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
exec_windows.go Revert "os: add handling of os.Interrupt for windows" 2022-04-04 15:12:26 +00:00
exec.go os: convert Process.isdone to atomic type 2022-09-15 21:11:27 +00:00
executable_darwin.go
executable_dragonfly.go
executable_freebsd.go
executable_path.go
executable_plan9.go
executable_procfs.go
executable_solaris.go
executable_sysctl.go
executable_test.go
executable_windows.go
executable.go
export_linux_test.go
export_test.go
export_unix_test.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
export_windows_test.go
fifo_test.go
file_mutex_plan9.go os: use poll.fdMutex for Plan 9 files 2022-10-08 03:57:40 +00:00
file_plan9.go all: fix function names in comments 2022-11-04 22:36:12 +00:00
file_posix.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
file_unix.go os: only add file descriptors which are set to non-blocking mode to the netpoller 2022-08-18 03:12:27 +00:00
file_windows.go os,syscall: File.Stat to use file handle for directories on Windows 2022-11-14 19:47:59 +00:00
file.go os,syscall: File.Stat to use file handle for directories on Windows 2022-11-14 19:47:59 +00:00
getwd.go
os_test.go os,syscall: File.Stat to use file handle for directories on Windows 2022-11-14 19:47:59 +00:00
os_unix_test.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
os_windows_test.go os,syscall: File.Stat to use file handle for directories on Windows 2022-11-14 19:47:59 +00:00
path_plan9.go
path_test.go
path_unix.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
path_windows_test.go
path_windows.go os: fix a typo in path_windows.go 2022-06-30 21:52:06 +00:00
path.go
pipe2_unix.go
pipe_test.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
pipe_unix.go
proc.go runtime: add an exit hook facility 2022-09-26 21:49:14 +00:00
rawconn_test.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
rawconn.go
read_test.go
readfrom_linux_test.go os: add a test case of copying a file itself via io.Copy 2022-09-09 15:34:46 +00:00
readfrom_linux.go
readfrom_stub.go
removeall_at.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
removeall_noat.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
removeall_test.go
rlimit_darwin.go
rlimit_stub.go
rlimit_test.go os: use a lower file count for TestOpenFileLimit on openbsd 2022-04-23 14:26:25 +00:00
rlimit.go all: use "unix" build tag where appropriate 2022-09-30 23:58:34 +00:00
stat_aix.go
stat_darwin.go os: use syscall.Timespec.Unix 2022-03-28 04:41:26 +00:00
stat_dragonfly.go os: use syscall.Timespec.Unix 2022-03-28 04:41:26 +00:00
stat_freebsd.go os: use syscall.Timespec.Unix 2022-03-28 04:41:26 +00:00
stat_js.go os: use syscall.Timespec.Unix 2022-03-28 04:41:26 +00:00
stat_linux.go os: use syscall.Timespec.Unix 2022-03-28 04:41:26 +00:00
stat_netbsd.go os: use syscall.Timespec.Unix 2022-03-28 04:41:26 +00:00
stat_openbsd.go os: use syscall.Timespec.Unix 2022-03-28 04:41:26 +00:00
stat_plan9.go os: use poll.fdMutex for Plan 9 files 2022-10-08 03:57:40 +00:00
stat_solaris.go os: mark Solaris nam/door/port files as irregular 2022-04-12 01:41:47 +00:00
stat_test.go
stat_unix.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
stat_windows.go os,syscall: File.Stat to use file handle for directories on Windows 2022-11-14 19:47:59 +00:00
stat.go
sticky_bsd.go
sticky_notbsd.go
str.go all: fix some typos 2022-10-06 02:49:55 +00:00
sys_aix.go
sys_bsd.go
sys_js.go
sys_linux.go
sys_plan9.go
sys_solaris.go
sys_unix.go all: use new "unix" build tag where appropriate 2022-03-29 16:24:51 +00:00
sys_windows.go
sys.go
tempfile_test.go all: fix spelling 2022-05-18 00:47:29 +00:00
tempfile.go
timeout_test.go os: simplify deadline fluctuation tests 2022-06-30 19:37:21 +00:00
types_plan9.go os: use poll.fdMutex for Plan 9 files 2022-10-08 03:57:40 +00:00
types_unix.go
types_windows.go os: remove special casing of NUL in Windows file operations 2022-11-09 22:06:14 +00:00
types.go
wait6_dragonfly.go os: split wait6 syscall wrapper into per-platform files 2022-10-13 21:25:45 +00:00
wait6_freebsd64.go os: split wait6 syscall wrapper into per-platform files 2022-10-13 21:25:45 +00:00
wait6_freebsd_386.go os: split wait6 syscall wrapper into per-platform files 2022-10-13 21:25:45 +00:00
wait6_freebsd_arm.go os: split wait6 syscall wrapper into per-platform files 2022-10-13 21:25:45 +00:00
wait6_netbsd.go os: split wait6 syscall wrapper into per-platform files 2022-10-13 21:25:45 +00:00
wait_unimp.go os: use wait6 to avoid wait/kill race on netbsd 2022-09-19 18:44:37 +00:00
wait_wait6.go os: split wait6 syscall wrapper into per-platform files 2022-10-13 21:25:45 +00:00
wait_waitid.go