mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:56:56 +08:00
29 lines
536 B
Go
29 lines
536 B
Go
package services
|
|
|
|
import (
|
|
//m "github.com/grafana/grafana/pkg/cmd/grafana-cli/models"
|
|
"io/ioutil"
|
|
"os"
|
|
)
|
|
|
|
//var IoUtils m.IoUtil = IoUtilImp{}
|
|
|
|
type IoUtilImp struct {
|
|
}
|
|
|
|
func (i IoUtilImp) Stat(path string) (os.FileInfo, error) {
|
|
return os.Stat(path)
|
|
}
|
|
|
|
func (i IoUtilImp) RemoveAll(path string) error {
|
|
return os.RemoveAll(path)
|
|
}
|
|
|
|
func (i IoUtilImp) ReadDir(path string) ([]os.FileInfo, error) {
|
|
return ioutil.ReadDir(path)
|
|
}
|
|
|
|
func (i IoUtilImp) ReadFile(filename string) ([]byte, error) {
|
|
return ioutil.ReadFile(filename)
|
|
}
|