Commit 75b155e7 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Expose LoopbackFileSystem's root member.

parent e96d4b8d
...@@ -16,20 +16,20 @@ var _ = fmt.Println ...@@ -16,20 +16,20 @@ var _ = fmt.Println
var _ = log.Println var _ = log.Println
type LoopbackFileSystem struct { type LoopbackFileSystem struct {
root string Root string
DefaultFileSystem DefaultFileSystem
} }
func NewLoopbackFileSystem(root string) (out *LoopbackFileSystem) { func NewLoopbackFileSystem(root string) (out *LoopbackFileSystem) {
out = new(LoopbackFileSystem) out = new(LoopbackFileSystem)
out.root = root out.Root = root
return out return out
} }
func (me *LoopbackFileSystem) GetPath(relPath string) string { func (me *LoopbackFileSystem) GetPath(relPath string) string {
return filepath.Join(me.root, relPath) return filepath.Join(me.Root, relPath)
} }
func (me *LoopbackFileSystem) GetAttr(name string) (*os.FileInfo, Status) { func (me *LoopbackFileSystem) GetAttr(name string) (*os.FileInfo, Status) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment