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

files ls #1073

Merged
merged 11 commits into from
Nov 14, 2017
Merged

files ls #1073

merged 11 commits into from
Nov 14, 2017

Conversation

pgte
Copy link
Contributor

@pgte pgte commented Nov 12, 2017

Based on #940 and ipfs-inactive/js-ipfs-unixfs-engine#197

  • core ipfs.files.ls and ipfs.ls
  • cli files ls and ls alias
  • http server api
  • http client api
  • interface-ipfs-core tests

@ghost ghost assigned pgte Nov 12, 2017
@ghost ghost added the status/in-progress In progress label Nov 12, 2017
@pgte pgte changed the title files ls WIP: files ls Nov 12, 2017
@pgte pgte mentioned this pull request Nov 12, 2017
10 tasks
@daviddias
Copy link
Member

@pgte make sure to rebase master onto this branch, there were some fixes there that will affect how your tests run (not your codebase though :))

@pgte
Copy link
Contributor Author

pgte commented Nov 13, 2017

Depends on

@pgte pgte changed the title WIP: files ls files ls Nov 13, 2017
@ghost ghost assigned daviddias Nov 13, 2017
@@ -13,6 +13,7 @@ const waterfall = require('async/waterfall')
const isStream = require('is-stream')
const Duplex = require('stream').Duplex
const CID = require('cids')
const toB58String = require('multihashes').toB58String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use new CID(hash).toBaseEncodedString() instead

api.route({
// TODO fix method
method: '*',
path: '/api/v0/files/ls',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be just /api/v0/ls

@daviddias
Copy link
Member

Tests failed for me with:

image

daviddias
daviddias previously approved these changes Nov 14, 2017
@daviddias
Copy link
Member

CI failed because of missing linting

https://travis-ci.org/ipfs/js-ipfs/jobs/301842793#L2971-L2973

I'm fixing it

@daviddias daviddias merged commit 35687cb into master Nov 14, 2017
@daviddias daviddias deleted the feat/ls branch November 14, 2017 09:35
@ghost ghost removed the status/in-progress In progress label Nov 14, 2017
@richardschneider
Copy link
Contributor

I just got fresh code from master and it appears that files ls is still not there. Am I doing something wrong?

> git checkout master
> git pull
> npm install
> node src\cli\bin.js files --help
bin.js files

Operations over files (add, cat, get, ls, etc)

Commands:
  bin.js files add <file>       Add a file to IPFS using the UnixFS data format
  bin.js files cat <ipfs-path>  Fetch and cat an IPFS path referencing a file
  bin.js files get <ipfs-path>  Fetch a file or directory with files references
                                from an IPFS Path

Options:
  --version  Show version number                                       [boolean]
  --silent   Write no output                          [boolean] [default: false]
  --help     Show help                                                 [boolean]

@daviddias
Copy link
Member

@richardschneider This implemented ipfs.ls. Right now in the state of things in go-ipfs there is:

  • ipfs ls
  • ipfs file ls
  • ipfs files ls (mfs exclusive)

We want to converge all of them, step by step :)

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

Successfully merging this pull request may close these issues.

4 participants