Skip to content

Commit

Permalink
windows: add GetFileTime
Browse files Browse the repository at this point in the history
Add a simple Windows API GetFileTime.
The document is https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfiletime

Fixes golang/go#21541

Change-Id: Ia7b8385d27348b2abc0ee560c5bd7e66cb6d13f2
GitHub-Last-Rev: 6700dcc
GitHub-Pull-Request: #174
Reviewed-on: https://go-review.googlesource.com/c/sys/+/528015
Reviewed-by: Michael Pratt <[email protected]>
Reviewed-by: Alex Brainman <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Alex Brainman <[email protected]>
Auto-Submit: Michael Pratt <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
aisk authored and gopherbot committed Oct 6, 2023
1 parent 6ee6208 commit 8ccaaf0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions windows/syscall_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) = userenv.CreateEnvironmentBlock
//sys DestroyEnvironmentBlock(block *uint16) (err error) = userenv.DestroyEnvironmentBlock
//sys getTickCount64() (ms uint64) = kernel32.GetTickCount64
//sys GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error)
//sys SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error)
//sys GetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW
//sys SetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW
Expand Down
9 changes: 9 additions & 0 deletions windows/zsyscall_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ccaaf0

Please sign in to comment.