OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / vendor / github.com / ipfs / go-ipfs-api / unixfs.go
diff --git a/vendor/github.com/ipfs/go-ipfs-api/unixfs.go b/vendor/github.com/ipfs/go-ipfs-api/unixfs.go
deleted file mode 100644 (file)
index bc862a3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package shell
-
-import (
-       "context"
-       "fmt"
-)
-
-type UnixLsObject struct {
-       Hash  string
-       Size  uint64
-       Type  string
-       Links []*UnixLsLink
-}
-
-type UnixLsLink struct {
-       Hash string
-       Name string
-       Size uint64
-       Type string
-}
-
-type lsOutput struct {
-       Objects map[string]*UnixLsObject
-}
-
-// FileList entries at the given path using the UnixFS commands
-func (s *Shell) FileList(path string) (*UnixLsObject, error) {
-       var out lsOutput
-       if err := s.Request("file/ls", path).Exec(context.Background(), &out); err != nil {
-               return nil, err
-       }
-
-       for _, object := range out.Objects {
-               return object, nil
-       }
-
-       return nil, fmt.Errorf("no object in results")
-}