launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/utils/file_unix.go (about) 1 // Copyright 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 // +build !windows 4 5 package utils 6 7 import "os" 8 9 // Replace atomically replaces the destination file or directory with the source. 10 // The errors that are returned are identical to those returned by os.Rename. 11 func ReplaceFile(source, destination string) error { 12 return os.Rename(source, destination) 13 }