1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-05 18:13:17 +00:00

Create fs.Directory interface and use it everywhere

This commit is contained in:
Nick Craig-Wood
2017-06-30 13:37:29 +01:00
parent e2d7d413ef
commit e7d04fc103
31 changed files with 226 additions and 250 deletions

View File

@@ -307,12 +307,7 @@ func (f *Fs) List(dir string) (entries fs.DirEntries, err error) {
name = strings.TrimRight(name, "/")
remote := path.Join(dir, name)
if isDir {
dir := &fs.Dir{
Name: remote,
When: timeUnset,
Bytes: 0,
Count: 0,
}
dir := fs.NewDir(remote, timeUnset)
entries = append(entries, dir)
} else {
file := &Object{