mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-15 19:37:28 +08:00
30 lines
716 B
Go
30 lines
716 B
Go
package main
|
|
|
|
import (
|
|
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
|
|
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
|
|
"github.com/jbenet/go-ipfs/core/commands"
|
|
)
|
|
|
|
var cmdIpfsLs = &commander.Command{
|
|
UsageLine: "ls",
|
|
Short: "List links from an object.",
|
|
Long: `ipfs ls <ipfs-path> - List links from an object.
|
|
|
|
Retrieves the object named by <ipfs-path> and displays the links
|
|
it contains, with the following format:
|
|
|
|
<link base58 hash> <link size in bytes> <link name>
|
|
|
|
`,
|
|
Run: lsCmd,
|
|
Flag: *flag.NewFlagSet("ipfs-ls", flag.ExitOnError),
|
|
}
|
|
|
|
var lsCmd = makeCommand(command{
|
|
name: "ls",
|
|
args: 1,
|
|
flags: nil,
|
|
cmdFn: commands.Ls,
|
|
})
|