rename_unix.go raw

   1  // +build !windows,!plan9
   2  
   3  package rename
   4  
   5  import (
   6  	"os"
   7  )
   8  
   9  // Atomic provides an atomic file rename. newpath is replaced if it already exists.
  10  func Atomic(oldpath, newpath string) (e error) {
  11  	return os.Rename(oldpath, newpath)
  12  }
  13