We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9e6dacd + 304e614 commit 345a8dfCopy full SHA for 345a8df
internal/fileutil/fileutil.go
@@ -1,3 +1,6 @@
1
+//go:build !windows
2
+// +build !windows
3
+
4
package fileutil
5
6
import (
internal/fileutil/fileutil_windows.go
@@ -0,0 +1,14 @@
+//go:build windows
+// +build windows
+package fileutil
+import (
7
+ "os"
8
+)
9
10
+// RenameAndSync will do an os.Rename followed by fsync to ensure the rename
11
+// is recorded
12
+func RenameAndSync(oldpath, newpath string) error {
13
+ return os.Rename(oldpath, newpath)
14
+}
0 commit comments