]> Cypherpunks repositories - gostls13.git/commit
os: factor out newFileStatFromWin32FileAttributeData
authorqmuntal <quimmuntal@gmail.com>
Fri, 23 Feb 2024 14:04:22 +0000 (15:04 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 28 Feb 2024 20:27:13 +0000 (20:27 +0000)
commitec8833ecc1d77cb8faa0d1b4b120f7efb713d67e
tree248ed2964c9e3e27b5371e38b08515b3a47d07da
parent88b2f25005f65343d9b73186e8f5c1e25554e233
os: factor out newFileStatFromWin32FileAttributeData

The stat function is quite long on Windows. Simplify it a bit by
factoring out the creation of a fileStat from a Win32FileAttributeData.

This also makes it more consistent with the creation of fileStats
from other sources, which all have their own dedicated functions.

Change-Id: I0443f96d892b70ce7f3b5e92c5049e4e4a240c6c
Reviewed-on: https://go-review.googlesource.com/c/go/+/566435
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/os/stat_windows.go
src/os/types_windows.go