提交 da44e21b 作者: Steven Allen

feat: make ls only work for directories

Long ago, `ls` was the _object_ (merkledag) level listing tool. That's no longer
the case.

This is a [breaking change] but I don't think anyone will object.

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 245c40b8
......@@ -160,9 +160,6 @@ func (api *UnixfsAPI) Ls(ctx context.Context, p coreiface.Path, opts ...options.
}
dir, err := uio.NewDirectoryFromNode(ses.dag, dagnode)
if err == uio.ErrNotADir {
return uses.lsFromLinks(ctx, dagnode.Links(), settings)
}
if err != nil {
return nil, err
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论