Commit e8196db4 authored by Łukasz Magiera's avatar Łukasz Magiera

coreapi: mirror unixfs file types

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent d93b9f11
...@@ -4,7 +4,7 @@ import ( ...@@ -4,7 +4,7 @@ import (
"context" "context"
"github.com/ipfs/go-ipfs/core/coreapi/interface/options" "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
"gx/ipfs/QmQ1JnYpnzkaurjW1yxkQxC2w3K1PorNE1nv1vaP5Le7sq/go-unixfs/pb" "gx/ipfs/QmQ1JnYpnzkaurjW1yxkQxC2w3K1PorNE1nv1vaP5Le7sq/go-unixfs"
ipld "gx/ipfs/QmRL22E4paat7ky7vx9MLpR97JHHbFPrg3ytFQw6qp1y1s/go-ipld-format" ipld "gx/ipfs/QmRL22E4paat7ky7vx9MLpR97JHHbFPrg3ytFQw6qp1y1s/go-ipld-format"
"gx/ipfs/QmaXvvAVAQ5ABqM5xtjYmV85xmN5MkWAZsX9H9Fwo4FVXp/go-ipfs-files" "gx/ipfs/QmaXvvAVAQ5ABqM5xtjYmV85xmN5MkWAZsX9H9Fwo4FVXp/go-ipfs-files"
) )
...@@ -16,10 +16,21 @@ type AddEvent struct { ...@@ -16,10 +16,21 @@ type AddEvent struct {
Size string `json:",omitempty"` Size string `json:",omitempty"`
} }
type FileType int32
const (
TRaw = FileType(unixfs.TRaw)
TFile = FileType(unixfs.TFile)
TDirectory = FileType(unixfs.TDirectory)
TMetadata = FileType(unixfs.TMetadata)
TSymlink = FileType(unixfs.TSymlink)
THAMTShard = FileType(unixfs.THAMTShard)
)
type LsLink struct { type LsLink struct {
Link *ipld.Link Link *ipld.Link
Size uint64 Size uint64
Type unixfs_pb.Data_DataType Type FileType
Err error Err error
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment