aboutsummaryrefslogtreecommitdiff
path: root/src/os/root_windows.go
diff options
context:
space:
mode:
authorDamien Neil <dneil@google.com>2025-03-19 11:15:06 -0700
committerGopher Robot <gobot@golang.org>2025-03-20 15:12:24 -0700
commit2ffda87f2dce71024f72ccff32cbfe29ee676bf8 (patch)
tree5b57b951657aede28982a20aeeb85d825e19670a /src/os/root_windows.go
parent686128a9f3f112c2e103622190673656811dee5f (diff)
downloadgo-2ffda87f2dce71024f72ccff32cbfe29ee676bf8.tar.xz
os: add Root.Rename
For #67002 Change-Id: Ifb1042bc5ceaeea64296763319b24634bbcb0bf0 Reviewed-on: https://go-review.googlesource.com/c/go/+/659416 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/os/root_windows.go')
-rw-r--r--src/os/root_windows.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os/root_windows.go b/src/os/root_windows.go
index 81fc5c320c..f4d2f4152b 100644
--- a/src/os/root_windows.go
+++ b/src/os/root_windows.go
@@ -315,6 +315,10 @@ func chtimesat(dirfd syscall.Handle, name string, atime time.Time, mtime time.Ti
return syscall.SetFileTime(h, nil, &a, &w)
}
+func renameat(oldfd syscall.Handle, oldname string, newfd syscall.Handle, newname string) error {
+ return windows.Renameat(oldfd, oldname, newfd, newname)
+}
+
func readlinkat(dirfd syscall.Handle, name string) (string, error) {
fd, err := openat(dirfd, name, windows.O_OPEN_REPARSE, 0)
if err != nil {