blob: beb7e3f0a9327649bc4dae07e265ff4d0d0c3a6a [file] [log] [blame]
package platform
import (
"context"
"io/ioutil"
"os"
"path/filepath"
)
const (
filePerms = 0666
)
// ReadFile reads the contents of name.
func ReadFile(ctx context.Context, name string) ([]byte, error) {
return ioutil.ReadFile(name)
}
// WriteFile writes data to filename.
func WriteFile(ctx context.Context, filename string, data []byte) error {
return ioutil.WriteFile(filename, data, filePerms)
}
// Stat reads the file system information of name.
func Stat(ctx context.Context, name string) (interface{}, error) {
return os.Stat(name)
}
// Glob returns all paths matching pattern.
func Glob(ctx context.Context, pattern string) ([]string, error) {
return filepath.Glob(pattern)
}