Skip to content

Commit

Permalink
Merge pull request #2683 from ipfs/feature/update-file-helptext
Browse files Browse the repository at this point in the history
Updated `file` helptext
  • Loading branch information
whyrusleeping committed May 13, 2016
2 parents b88c2c6 + 185619f commit 704dcb8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
22 changes: 20 additions & 2 deletions core/commands/unixfs/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

cmds "github.com/ipfs/go-ipfs/commands"
core "github.com/ipfs/go-ipfs/core"
merkledag "github.com/ipfs/go-ipfs/merkledag"
path "github.com/ipfs/go-ipfs/path"
unixfs "github.com/ipfs/go-ipfs/unixfs"
unixfspb "github.com/ipfs/go-ipfs/unixfs/pb"
merkledag "github.com/ipfs/go-ipfs/merkledag"
)

type LsLink struct {
Expand All @@ -36,12 +36,30 @@ type LsOutput struct {
var LsCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "List directory contents for Unix filesystem objects.",
Synopsis: "ipfs file ls <path>",
ShortDescription: `
Displays the contents of an IPFS or IPNS object(s) at the given path.
Displays the contents of an IPFS or IPNS object(s) at the given path.
The JSON output contains size information. For files, the child size
is the total size of the file contents. For directories, the child
size is the IPFS link size.
`,
LongDescription: `
Displays the contents of an IPFS or IPNS object(s) at the given path.
The JSON output contains size information. For files, the child size
is the total size of the file contents. For directories, the child
size is the IPFS link size.
The path can be a prefixless ref; in this case, we assume it to be an
/ipfs ref and not /ipns.
Example:
> ipfs file ls QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ
cat.jpg
> ipfs file ls /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ
cat.jpg
`,
},

Expand Down
6 changes: 6 additions & 0 deletions core/commands/unixfs/unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ import cmds "github.com/ipfs/go-ipfs/commands"
var UnixFSCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Interact with ipfs objects representing Unix filesystems.",
Synopsis: "ipfs file <command>",
ShortDescription: `
'ipfs file' provides a familiar interface to file systems represented
by IPFS objects, which hides IPFS implementation details like layout
objects (e.g. fanout and chunking).
`,
LongDescription: `
'ipfs file' provides a familiar interface to file systems represented
by IPFS objects, which hides IPFS implementation details like layout
objects (e.g. fanout and chunking).
`,
},

Expand Down

0 comments on commit 704dcb8

Please sign in to comment.