yoake/internal/filestore/fs.go

17 lines
269 B
Go
Raw Normal View History

2022-11-19 11:04:03 -06:00
package filestore
import "github.com/spf13/afero"
type FS interface {
afero.Fs
}
func NewFS(basepath string) FS {
bp := afero.NewBasePathFs(afero.NewOsFs(), basepath)
return bp
}
func ChrootFS(fs FS, chroot string) FS {
return afero.NewBasePathFs(fs, chroot)
}