mirror of
https://github.com/ipfs/kubo.git
synced 2025-05-24 02:17:15 +08:00

* go-log * sys * go-crypto License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
43 lines
1019 B
Go
43 lines
1019 B
Go
package unixfs
|
|
|
|
import (
|
|
cmds "github.com/ipfs/go-ipfs/commands"
|
|
e "github.com/ipfs/go-ipfs/core/commands/e"
|
|
|
|
"gx/ipfs/QmdE4gMduCKCGAcczM2F5ioYDfdeKuPix138wrES1YSr7f/go-ipfs-cmdkit"
|
|
)
|
|
|
|
var UnixFSCmd = &cmds.Command{
|
|
Helptext: cmdkit.HelpText{
|
|
Tagline: "Interact with IPFS objects representing Unix filesystems.",
|
|
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).
|
|
`,
|
|
},
|
|
|
|
Subcommands: map[string]*cmds.Command{
|
|
"ls": LsCmd,
|
|
},
|
|
}
|
|
|
|
// copy+pasted from ../commands.go
|
|
func unwrapOutput(i interface{}) (interface{}, error) {
|
|
var (
|
|
ch <-chan interface{}
|
|
ok bool
|
|
)
|
|
|
|
if ch, ok = i.(<-chan interface{}); !ok {
|
|
return nil, e.TypeErr(ch, i)
|
|
}
|
|
|
|
return <-ch, nil
|
|
}
|