@cryptotaxi247 / kubo / commits / eac8515c0

coreapi: mirror unixfs file types

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@e8196db410d2fc38fb64613bebedccc79c1ecaec This commit was moved from ipfs/boxo@e47af31e2d3e5b497f91392603ed5f6b760f6eff

Łukasz Magiera committed Feb 2, 2019 at 17:27 UTC eac8515c0b25512058d104042fdfde3e7d63d34b
1 file changed +13 -2
core/coreiface/unixfs.go
+13 -2
@@ -4,7 +4,7 @@ import (
4 "context"
5 "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
6
7 - "gx/ipfs/QmQ1JnYpnzkaurjW1yxkQxC2w3K1PorNE1nv1vaP5Le7sq/go-unixfs/pb"
7 + "gx/ipfs/QmQ1JnYpnzkaurjW1yxkQxC2w3K1PorNE1nv1vaP5Le7sq/go-unixfs"
8 ipld "gx/ipfs/QmRL22E4paat7ky7vx9MLpR97JHHbFPrg3ytFQw6qp1y1s/go-ipld-format"
9 "gx/ipfs/QmaXvvAVAQ5ABqM5xtjYmV85xmN5MkWAZsX9H9Fwo4FVXp/go-ipfs-files"
10 )
@@ -16,10 +16,21 @@ type AddEvent struct {
16 Size string `json:",omitempty"`
17 }
18
19 +type FileType int32
20 +
21 +const (
22 + TRaw = FileType(unixfs.TRaw)
23 + TFile = FileType(unixfs.TFile)
24 + TDirectory = FileType(unixfs.TDirectory)
25 + TMetadata = FileType(unixfs.TMetadata)
26 + TSymlink = FileType(unixfs.TSymlink)
27 + THAMTShard = FileType(unixfs.THAMTShard)
28 +)
29 +
30 type LsLink struct {
31 Link *ipld.Link
32 Size uint64
22 - Type unixfs_pb.Data_DataType
33 + Type FileType
34
35 Err error
36 }