mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-17 03:06:41 -07:00
feat(version): v1 release. see history for details
This commit is contained in:
parent
a0fc602e69
commit
c57a8c1320
14 changed files with 181 additions and 108 deletions
4
file.go
4
file.go
|
|
@ -2,10 +2,14 @@ package bimg
|
|||
|
||||
import "io/ioutil"
|
||||
|
||||
// Read reads all the content of the given file path
|
||||
// and returns it as byte buffer.
|
||||
func Read(path string) ([]byte, error) {
|
||||
return ioutil.ReadFile(path)
|
||||
}
|
||||
|
||||
// Write writes the given byte buffer into disk
|
||||
// to the given file path.
|
||||
func Write(path string, buf []byte) error {
|
||||
return ioutil.WriteFile(path, buf, 0644)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue