admin: Export more importer functions
This commit is contained in:
parent
092256d9e5
commit
1f833d39fc
7 changed files with 26 additions and 26 deletions
|
|
@ -80,7 +80,7 @@ func (i LocalImporter) importFile(URI string, next func(string, string) (interfa
|
|||
}
|
||||
}
|
||||
|
||||
func (i LocalImporter) getFile(filename string) (io.Reader, error) {
|
||||
func (i LocalImporter) GetFile(filename string) (io.Reader, error) {
|
||||
if fd, err := os.Open(path.Join(i.Base, filename)); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
|
|
@ -98,7 +98,7 @@ func (i LocalImporter) writeFile(filename string, reader io.Reader) error {
|
|||
}
|
||||
}
|
||||
|
||||
func (i LocalImporter) listDir(filename string) ([]string, error) {
|
||||
func (i LocalImporter) ListDir(filename string) ([]string, error) {
|
||||
if files, err := ioutil.ReadDir(path.Join(i.Base, filename)); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
|
|
@ -110,6 +110,6 @@ func (i LocalImporter) listDir(filename string) ([]string, error) {
|
|||
}
|
||||
}
|
||||
|
||||
func (i LocalImporter) stat(filename string) (os.FileInfo, error) {
|
||||
func (i LocalImporter) Stat(filename string) (os.FileInfo, error) {
|
||||
return os.Stat(path.Join(i.Base, filename))
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue