Add Root() to Fs interface

This commit is contained in:
Nick Craig-Wood 2015-09-01 20:45:27 +01:00
parent cbc6bf6a89
commit 92745aa950
8 changed files with 47 additions and 0 deletions

View file

@ -81,6 +81,14 @@ func (f *FsSwift) Name() string {
return f.name
}
// The root of the remote (as passed into NewFs)
func (f *FsSwift) Root() string {
if f.root == "" {
return f.container
}
return f.container + "/" + f.root
}
// String converts this FsSwift to a string
func (f *FsSwift) String() string {
if f.root == "" {