1 Star 0 Fork 0

sqos / beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
helper_other.go 349 Bytes
一键复制 编辑 原始数据 按行查看 历史
// +build !windows
package file
import (
"os"
"github.com/elastic/beats/libbeat/logp"
)
// SafeFileRotate safely rotates an existing file under path and replaces it with the tempfile
func SafeFileRotate(path, tempfile string) error {
if e := os.Rename(tempfile, path); e != nil {
logp.Err("Rotate error: %s", e)
return e
}
return nil
}
1
https://gitee.com/sqos/beats.git
git@gitee.com:sqos/beats.git
sqos
beats
beats
v6.0.0-beta1

搜索帮助