20 lines
420 B
Go
20 lines
420 B
Go
//go:build darwin
|
|
|
|
package fileops
|
|
|
|
import (
|
|
"os"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func checkAtomicDirectoryPromotionSupport() error { return nil }
|
|
|
|
func renameDirectoryNoReplace(src, dst string) error {
|
|
return unix.RenamexNp(src, dst, unix.RENAME_EXCL)
|
|
}
|
|
|
|
func renameDirectoryNoReplaceAt(parent *os.File, src, dst string) error {
|
|
return unix.RenameatxNp(int(parent.Fd()), src, int(parent.Fd()), dst, unix.RENAME_EXCL)
|
|
}
|