update
This commit is contained in:
parent
d1d84f2faa
commit
9b05f61506
|
@ -31,3 +31,9 @@ func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error {
|
|||
}
|
||||
return os.Rename(f.Name(), filename)
|
||||
}
|
||||
|
||||
// Check file exists or not
|
||||
func FileExists(name string) bool {
|
||||
_, err := os.Stat(name)
|
||||
return !os.IsNotExist(err)
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package io2
|
||||
package ioutil2
|
||||
|
||||
import (
|
||||
"errors"
|
|
@ -1,4 +1,4 @@
|
|||
package io2
|
||||
package ioutil2
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
Loading…
Reference in New Issue