Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Implement the jsipfs ls command #927

Closed
daviddias opened this issue Jul 23, 2017 · 8 comments
Closed

Implement the jsipfs ls command #927

daviddias opened this issue Jul 23, 2017 · 8 comments
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue P3 Low: Not priority right now

Comments

@daviddias
Copy link
Member

Following: https://github.com/ipfs/js-ipfs/pull/925/files

We want to support the same command that go-ipfs supports: jsipfs ls.

From go-ipfs:

» ipfs ls --help
USAGE
  ipfs ls <ipfs-path>... - List directory contents for Unix filesystem objects.

SYNOPSIS
  ipfs ls [--headers | -v] [--resolve-type=false] [--] <ipfs-path>...

ARGUMENTS

  <ipfs-path>... - The path to the IPFS object(s) to list links from.

OPTIONS

  -v,           --headers bool - Print table headers (Hash, Size, Name). Default: false.
  --resolve-type          bool - Resolve linked objects to find out their types. Default: true.

DESCRIPTION

  Displays the contents of an IPFS or IPNS object(s) at the given path, with
  the following format:

    <link base58 hash> <link size in bytes> <link name>

  The JSON output contains type information.
@daviddias daviddias added exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue labels Jul 23, 2017
@rasmuserik
Copy link
Contributor

I will probably take a look at this next week.

@daviddias daviddias added P3 Low: Not priority right now status/deferred Conscious decision to pause or backlog labels Jul 26, 2017
@rasmuserik
Copy link
Contributor

rasmuserik commented Aug 1, 2017

I am starting to look at this now :)

Apparently, at first look, it seems like
directories are currently stored using
using the old Protocol Buffer format,
and not CBOR encoded IPLD?

Are we still only using the (legacy?) protocol buffers,
or should we begin to handle files/directories in IPLD?


(Adding a directory yields a block which definitely looks like a protocol buffer, and not CBOR.
I found an example of what a directory in IPLD looks like, but the actual spec for files / unixfs is empty..)

@daviddias
Copy link
Member Author

@rasmuserik dag-pb is not legacy, it is just one of the many formats that IPLD supports. unixfs-engine uses dag-pb and will continue to :)

@rasmuserik
Copy link
Contributor

nice, thanks, that makes things a lot more clear :)
(I thought they were legacy due to this part of the IPLD specs)

@rasmuserik rasmuserik mentioned this issue Aug 2, 2017
10 tasks
@daviddias
Copy link
Member Author

Oh, thanks. We need to review all IPLD specs, added a note to the top of that one to make sure we don't misinform anyone else. Thanks for catching that :)

rasmuserik added a commit to rasmuserik/js-ipfs that referenced this issue Aug 12, 2017
License: MIT
Signed-off-by: Rasmus Erik Voel Jensen <github-rasmuserik@solsort.dk>
rasmuserik added a commit to rasmuserik/js-ipfs that referenced this issue Aug 12, 2017
License: MIT
Signed-off-by: Rasmus Erik Voel Jensen <github-rasmuserik@solsort.dk>
@rasmuserik
Copy link
Contributor

I've added a pull request #940 which implements the basic functionality, - in hindsight it might be not be the right approach, - but you can choose whether to merge it. (I got to know some parts of IPFS better and I will be looking at other aspects next).

rasmuserik added a commit to rasmuserik/js-ipfs that referenced this issue Aug 23, 2017
License: MIT
Signed-off-by: Rasmus Erik Voel Jensen <github-rasmuserik@solsort.dk>
@daviddias daviddias added status/ready Ready to be worked and removed status/deferred Conscious decision to pause or backlog labels Sep 13, 2017
@atvanguard
Copy link
Contributor

Starting to attempt this one.

pgte pushed a commit that referenced this issue Nov 12, 2017
License: MIT
Signed-off-by: Rasmus Erik Voel Jensen <github-rasmuserik@solsort.dk>
pgte pushed a commit that referenced this issue Nov 12, 2017
License: MIT
Signed-off-by: Rasmus Erik Voel Jensen <github-rasmuserik@solsort.dk>
@daviddias
Copy link
Member Author

Done by @richardschneider and completed by @JonKrone with #1222

👏🏽👏🏽👏🏽 Thank you!! 👏🏽👏🏽👏🏽

@ghost ghost removed the status/ready Ready to be worked label Feb 21, 2018
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this issue May 22, 2020
BREAKING CHANGE: All API methods that returned [`big.js`](https://github.com/MikeMcl/big.js/) instances now return [`bignumber.js`](https://github.com/MikeMcl/bignumber.js/) instances.

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue P3 Low: Not priority right now
Projects
None yet
Development

No branches or pull requests

3 participants