kubo/commands
W. Trevor King 663f37cb99 core/commands/unixfs/ls: Don't recurse into chunked files
Folks operating at the Unix-filesystem level shouldn't care about that
level of Merkle-DAG detail.  Before this commit we had:

  $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
  /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox:
  ... several lines of empty-string names ...

And with this commit we have:

  $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
  /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox

I also reworked the argument-prefixing (object.Argument) in the output
marshaller to avoid redundancies like:

  $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
  /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox:
  /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox

As a side-effect of this rework, we no longer have the trailing blank
line that we used to have after the final directory listing.

The new ErrImplementation is like Python's NotImplementedError, and is
mostly a way to guard against external changes that would need
associated updates in this code.  For example, once we see something
that's neither a file nor a directory, we'll have to update the switch
statement to handle those objects.

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-13 13:06:34 -07:00
..
cli Replace 'var * bytes.Buffer' with '\1 := new(bytes.Buffer)' 2015-05-26 23:18:04 +07:00
files commands: URL escape filenames in multipart files, resolves #654 2015-02-04 16:53:24 -08:00
http Vendor CORS library. 2015-05-10 10:58:37 -07:00
argument.go commands: Added Recursive modifier to Argument 2014-11-18 02:13:54 -08:00
channelmarshaler.go commands: Made default JSON marshaler support channel output 2015-01-06 15:53:48 -08:00
command_test.go commands: Refactored Command#Run function signature to (req Request, res Response) 2015-01-23 18:29:29 -08:00
command.go commands/command: Add a package comment 2015-04-30 21:25:55 -07:00
option_test.go tests(commands/option) test the OptionValue methods 2014-11-14 03:19:57 -08:00
option.go Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs 2015-03-31 12:52:25 -07:00
request.go Remove daemon InitDone guard in interrupt handler 2015-04-20 16:35:35 +02:00
response_test.go Replace 'var * bytes.Buffer' with '\1 := new(bytes.Buffer)' 2015-05-26 23:18:04 +07:00
response.go core/commands/unixfs/ls: Don't recurse into chunked files 2015-06-13 13:06:34 -07:00