返回 DeepSeek-Reasonix
rename_noreplace_darwin.go
根目录 / internal / fileutil / rename_noreplace_darwin.go
1 //go:build darwin
2
3 package fileutil
4
5 import "golang.org/x/sys/unix"
6
7 func RenameNoReplace(oldPath, newPath string) error {
8 return unix.RenameatxNp(unix.AT_FDCWD, oldPath, unix.AT_FDCWD, newPath, unix.RENAME_EXCL)
9 }
10
10 lines GO