mirror of https://github.com/talgo-cloud/bimg.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
358 B
16 lines
358 B
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)
|
|
}
|