aboutsummaryrefslogtreecommitdiffstats
path: root/common/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/path.go')
-rw-r--r--common/path.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/common/path.go b/common/path.go
index d38b1fd5b..a74a0d5bd 100644
--- a/common/path.go
+++ b/common/path.go
@@ -2,7 +2,6 @@ package common
import (
"fmt"
- "io/ioutil"
"os"
"os/user"
"path"
@@ -43,35 +42,6 @@ func FileExist(filePath string) bool {
return true
}
-func ReadAllFile(filePath string) (string, error) {
- file, err := os.Open(filePath)
- if err != nil {
- return "", err
- }
-
- data, err := ioutil.ReadAll(file)
- if err != nil {
- return "", err
- }
-
- return string(data), nil
-}
-
-func WriteFile(filePath string, content []byte) error {
- fh, err := os.OpenFile(filePath, os.O_TRUNC|os.O_RDWR|os.O_CREATE, os.ModePerm)
- if err != nil {
- return err
- }
- defer fh.Close()
-
- _, err = fh.Write(content)
- if err != nil {
- return err
- }
-
- return nil
-}
-
func AbsolutePath(Datadir string, filename string) string {
if path.IsAbs(filename) {
return filename