diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-01-15 23:56:24 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-01-15 23:56:24 -0800 |
| commit | a4063a5437f0554962bcdadefc96c9131f8c0395 (patch) | |
| tree | d5dc7e0937d00fd0b3586917656becdac2f8e16f /weed/filesys/dir.go | |
| parent | 01dc8a43ba007d21f97c40271b366e538f752227 (diff) | |
| download | seaweedfs-a4063a5437f0554962bcdadefc96c9131f8c0395.tar.xz seaweedfs-a4063a5437f0554962bcdadefc96c9131f8c0395.zip | |
add stream list directory entries
Diffstat (limited to 'weed/filesys/dir.go')
| -rw-r--r-- | weed/filesys/dir.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index f2fbd99d3..2cc332635 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -319,14 +319,14 @@ func (dir *Dir) ReadDirAll(ctx context.Context) (ret []fuse.Dirent, err error) { glog.Errorf("dir ReadDirAll %s: %v", dirPath, err) return nil, fuse.EIO } - listedEntries, listErr := dir.wfs.metaCache.ListDirectoryEntries(context.Background(), util.FullPath(dir.FullPath()), "", false, int64(math.MaxInt32)) + listErr := dir.wfs.metaCache.ListDirectoryEntries(context.Background(), util.FullPath(dir.FullPath()), "", false, int64(math.MaxInt32), func(entry *filer.Entry) bool { + processEachEntryFn(entry.ToProtoEntry(), false) + return true + }) if listErr != nil { glog.Errorf("list meta cache: %v", listErr) return nil, fuse.EIO } - for _, cachedEntry := range listedEntries { - processEachEntryFn(cachedEntry.ToProtoEntry(), false) - } return } |
