fork/gdu
git clone https://git.julia.blue/fork/gdu
9ca5c60
master
1//go:build !windows && !linux && !darwin 2 3package remove 4 5import "os" 6 7func renameNoReplace (oldpath ,newpath string )error { 8if _ ,err := os .Lstat (newpath );err == nil { 9return os .ErrExist 10 }else if ! os .IsNotExist (err ) { 11return err 12 } 13return os .Rename (oldpath ,newpath ) 14}