Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add slash for dir in ipfs files ls #5601

Closed
overbool opened this issue Oct 15, 2018 · 2 comments
Closed

Add slash for dir in ipfs files ls #5601

overbool opened this issue Oct 15, 2018 · 2 comments

Comments

@overbool
Copy link
Contributor

overbool commented Oct 15, 2018

We can get the follow result using ipfs files ls:

dir-a
dir-b
a
b
c

Is this a good advice that add the slash for directory to distinguish directory from file?

just like the follow:

dir-a/
dir-b/
a
b
c
@Stebalien
Copy link
Member

We can but, unfortunately, this will force us to fetch the first block of every file to resolve the type. However, I don't think this'll be that much of an issue in practice, especially for MFS. This is also what ipfs ls does so we should probably just mirror that.

Thoughts @schomatis?

@schomatis
Copy link
Contributor

We could add the slash when using the -l flag which already fetches that information,

https://github.com/ipfs/go-ipfs/blob/9bf4e4145ea897ced2f9aa2087296b3beda6e941/core/commands/files.go#L456-L460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants