Support atomic directory promotion across platforms
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
//go:build !linux
|
||||
//go:build !linux && !darwin && !windows
|
||||
|
||||
package fileops
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func checkAtomicDirectoryPromotionSupport() error {
|
||||
return fmt.Errorf("%w on %s", ErrAtomicDirectoryPromotionUnsupported, runtime.GOOS)
|
||||
}
|
||||
|
||||
func renameDirectoryNoReplace(_, _ string) error {
|
||||
return fmt.Errorf("atomic no-replace directory rename is unsupported on this platform")
|
||||
return checkAtomicDirectoryPromotionSupport()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user