diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-27 05:42:46 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-27 05:42:46 +0800 |
commit | 6bd1f6cc49acd459e61559e5af515da2db2481e5 (patch) | |
tree | 3e4f7a51ca8e3cb03d24fbe1898578d88fd7456c /common/path.go | |
parent | bb12dbe233db2e064715b329b7ba987c76ba3bfa (diff) | |
parent | b0b0939879b9fb8453ec1c8fa2ceb522e56df3bc (diff) | |
download | go-tangerine-6bd1f6cc49acd459e61559e5af515da2db2481e5.tar go-tangerine-6bd1f6cc49acd459e61559e5af515da2db2481e5.tar.gz go-tangerine-6bd1f6cc49acd459e61559e5af515da2db2481e5.tar.bz2 go-tangerine-6bd1f6cc49acd459e61559e5af515da2db2481e5.tar.lz go-tangerine-6bd1f6cc49acd459e61559e5af515da2db2481e5.tar.xz go-tangerine-6bd1f6cc49acd459e61559e5af515da2db2481e5.tar.zst go-tangerine-6bd1f6cc49acd459e61559e5af515da2db2481e5.zip |
Merge remote-tracking branch 'origin' into rpcargs
Conflicts:
rpc/args.go
Diffstat (limited to 'common/path.go')
-rw-r--r-- | common/path.go | 30 |
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 |