go/src/os
qmuntal 49319ed5c7 os: avoid GetFileInformationByHandleEx call when stat'ing files on Windows
os.Stat and os.Lstat on Windows use GetFileInformationByHandleEx to
retrieve file information for reparse points and files that
GetFileAttributesEx does not handle.

However, GetFileInformationByHandleEx is only necessary for
reparse points, so we can avoid the call for regular files.

With this change we can drop the FAT hack that was added in CL 154377,
as files won't have the FILE_ATTRIBUTE_REPARSE_POINT attribute set
on that file system.

Change-Id: Id18639067a6c3fa1bb2c6706d5b79358c224fe37
Reviewed-on: https://go-review.googlesource.com/c/go/+/566397
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2024-02-27 16:41:24 +00:00
..
exec std: fix more nilness findings 2024-02-26 22:01:11 +00:00
signal os: add available godoc link 2024-02-26 21:33:12 +00:00
testdata
user os: add available godoc link 2024-02-26 21:33:12 +00:00
dir.go os: add available godoc link 2024-02-26 21:33:12 +00:00
dir_darwin.go os: do not skip directory entries with zero inodes on wasip1 2023-07-06 23:23:41 +00:00
dir_plan9.go all: add String for fs.{FileInfo,DirEntry} implementations 2023-05-04 16:27:35 +00:00
dir_unix.go os: do not skip directory entries with zero inodes on wasip1 2023-07-06 23:23:41 +00:00
dir_windows.go os: avoid allocating a string for ReadDir skipped entries on Windows 2023-08-21 08:33:51 +00:00
dirent_aix.go
dirent_dragonfly.go
dirent_freebsd.go
dirent_js.go
dirent_linux.go
dirent_netbsd.go
dirent_openbsd.go
dirent_solaris.go
dirent_wasip1.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
endian_big.go
endian_little.go
env.go os: add available godoc link 2024-02-26 21:33:12 +00:00
env_test.go os, syscall: update unreachable link about =C: envs 2023-07-04 15:31:54 +00:00
env_unix_test.go
error.go os: add available godoc link 2024-02-26 21:33:12 +00:00
error_errno.go
error_plan9.go
error_posix.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
error_test.go os: remove unnecessary return after t.Fatal 2023-05-19 00:41:52 +00:00
error_unix_test.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
error_windows_test.go
example_test.go os: relax tests and add examples for UserCacheDir and UserConfigDir 2024-01-10 17:35:49 +00:00
exec.go os: add available godoc link 2024-02-26 21:33:12 +00:00
exec_plan9.go os: add available godoc link 2024-02-26 21:33:12 +00:00
exec_posix.go Revert "os: make use of pidfd on linux" 2024-02-23 18:31:19 +00:00
exec_unix.go Revert "os: make use of pidfd on linux" 2024-02-23 18:31:19 +00:00
exec_unix_test.go os: use t.Fatalf instead of t.Errorf in TestErrProcessDone 2023-08-07 00:23:04 +00:00
exec_windows.go os: use atomic.Uintptr for Process.handle 2024-02-21 21:23:31 +00:00
exec_windows_test.go os: remove 5ms sleep on Windows in (*Process).Wait 2023-07-26 15:13:24 +00:00
executable.go os: add available godoc link 2024-02-26 21:33:12 +00:00
executable_darwin.go
executable_dragonfly.go
executable_freebsd.go
executable_path.go
executable_plan9.go
executable_procfs.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
executable_solaris.go
executable_sysctl.go
executable_test.go all: use ^$ instead of XXXX, NoSuchTestExists to match no tests 2023-09-05 23:35:32 +00:00
executable_wasm.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
executable_windows.go
export_linux_test.go Revert "os: make use of pidfd on linux" 2024-02-23 18:31:19 +00:00
export_test.go os: ensure File.ReadFrom returns ErrClosed instead of the internal poll.ErrFileClosing 2023-02-27 06:21:27 +00:00
export_unix_test.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
export_windows_test.go runtime,internal/syscall/windows: remove long path support check 2024-02-07 20:54:38 +00:00
fifo_test.go os: if descriptor is non-blocking, retain that in Fd method 2023-05-17 21:12:04 +00:00
file.go os: add available godoc link 2024-02-26 21:33:12 +00:00
file_mutex_plan9.go
file_open_unix.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
file_open_wasip1.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
file_plan9.go os: add available godoc link 2024-02-26 21:33:12 +00:00
file_posix.go os: add available godoc link 2024-02-26 21:33:12 +00:00
file_unix.go os: add available godoc link 2024-02-26 21:33:12 +00:00
file_wasip1.go net: implement wasip1 FileListener and FileConn 2023-05-25 00:12:41 +00:00
file_windows.go os: add available godoc link 2024-02-26 21:33:12 +00:00
getwd.go
os_test.go os: avoid writing within the tree during testing CopyFS 2024-02-23 05:09:01 +00:00
os_unix_test.go os: in TestMkdirStickyUmask, create a non-sticky directory as a control 2023-09-18 17:32:43 +00:00
os_windows_test.go src: a/an grammar fixes 2023-11-20 15:56:08 +00:00
path.go os: add available godoc link 2024-02-26 21:33:12 +00:00
path_plan9.go os: make MkdirAll support volume names 2023-08-09 15:15:57 +00:00
path_test.go os: clean up tests 2023-01-19 20:45:37 +00:00
path_unix.go os: make MkdirAll support volume names 2023-08-09 15:15:57 +00:00
path_windows.go runtime,internal/syscall/windows: remove long path support check 2024-02-07 20:54:38 +00:00
path_windows_test.go runtime,internal/syscall/windows: remove long path support check 2024-02-07 20:54:38 +00:00
pipe2_unix.go os: explicitly check for invalid FD in NewFile 2023-05-24 20:19:46 +00:00
pipe_test.go all: use ^TestName$ regular pattern for invoking a single test 2023-09-05 23:35:29 +00:00
pipe_unix.go os: explicitly check for invalid FD in NewFile 2023-05-24 20:19:46 +00:00
pipe_wasm.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
proc.go os: add available godoc link 2024-02-26 21:33:12 +00:00
rawconn.go
rawconn_test.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
read_test.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
readfrom_linux_test.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
removeall_at.go os: explicitly check for invalid FD in NewFile 2023-05-24 20:19:46 +00:00
removeall_noat.go
removeall_test.go all: use ^TestName$ regular pattern for invoking a single test 2023-09-05 23:35:29 +00:00
stat.go os: add available godoc link 2024-02-26 21:33:12 +00:00
stat_aix.go
stat_darwin.go
stat_dragonfly.go
stat_freebsd.go
stat_js.go
stat_linux.go
stat_netbsd.go
stat_openbsd.go
stat_plan9.go
stat_solaris.go
stat_test.go os: support Stat and LStat for CON device on Windows 2024-02-07 20:53:05 +00:00
stat_unix.go os: add available godoc link 2024-02-26 21:33:12 +00:00
stat_wasip1.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
stat_windows.go os: add available godoc link 2024-02-26 21:33:12 +00:00
sticky_bsd.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
sticky_notbsd.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
sys.go
sys_aix.go
sys_bsd.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
sys_js.go
sys_linux.go
sys_plan9.go
sys_solaris.go
sys_unix.go
sys_wasip1.go os: add wasip1 support 2023-04-07 23:34:21 +00:00
sys_windows.go
tempfile.go os: add available godoc link 2024-02-26 21:33:12 +00:00
tempfile_test.go os: clean up tests 2023-01-19 20:45:37 +00:00
timeout_test.go all: fix spelling errors 2023-06-14 00:03:57 +00:00
types.go os: add available godoc link 2024-02-26 21:33:12 +00:00
types_plan9.go
types_unix.go
types_windows.go os: avoid GetFileInformationByHandleEx call when stat'ing files on Windows 2024-02-27 16:41:24 +00:00
wait6_dragonfly.go
wait6_freebsd64.go
wait6_freebsd_386.go
wait6_freebsd_arm.go
wait6_netbsd.go
wait_unimp.go os: adjust wait6/waitid comment for netbsd 2023-04-11 13:16:52 +00:00
wait_wait6.go
wait_waitid.go os: replace "used to used" with "used to use" in description text 2023-08-07 00:27:57 +00:00
writeto_linux_test.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
zero_copy_linux.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00
zero_copy_stub.go net,os: arrange zero-copy of os.File and net.TCPConn to net.UnixConn 2023-11-17 23:16:28 +00:00