Skip to content
Permalink
Browse files

add disk sync function

  • Loading branch information...
cbrake committed May 9, 2019
1 parent e95a1dd commit e873111fc88019f03c36811116ab520eca8a8abf
Showing with 9 additions and 1 deletion.
  1. +9 −1 file/util.go
@@ -1,6 +1,9 @@
package file

import "os"
import (
"os"
"os/exec"
)

// Exists returns true if file exists, else false
func Exists(path string) bool {
@@ -10,3 +13,8 @@ func Exists(path string) bool {

return true
}

// SyncDisks runs the linux "sync" command
func SyncDisks() error {
return exec.Command("sync").Run()
}

0 comments on commit e873111

Please sign in to comment.
You can’t perform that action at this time.