Create fs.Directory interface and use it everywhere

This commit is contained in:
Nick Craig-Wood
2017-06-30 14:26:59 +01:00
parent e2d7d413ef
commit e7d04fc103
31 changed files with 226 additions and 250 deletions
+1 -6
View File
@@ -264,12 +264,7 @@ func (f *Fs) List(dir string) (entries fs.DirEntries, err error) {
for _, info := range infos {
remote := path.Join(dir, info.Name())
if info.IsDir() {
d := &fs.Dir{
Name: remote,
When: info.ModTime(),
Bytes: -1,
Count: -1,
}
d := fs.NewDir(remote, info.ModTime())
entries = append(entries, d)
} else {
o := &Object{