coreunix

package
v0.37.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2025 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 27 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMetadataTo

func AddMetadataTo(n *core.IpfsNode, skey string, m *ft.Metadata) (string, error)

func Metadata

func Metadata(n *core.IpfsNode, skey string) (*ft.Metadata, error)

Types

type Adder added in v0.4.0

type Adder struct {
	Out               chan<- interface{}
	Progress          bool
	Pin               bool
	PinName           string
	Trickle           bool
	RawLeaves         bool
	MaxLinks          int
	MaxDirectoryLinks int
	MaxHAMTFanout     int
	Silent            bool
	NoCopy            bool
	Chunker           string

	CidBuilder cid.Builder

	PreserveMode  bool
	PreserveMtime bool
	FileMode      os.FileMode
	FileMtime     time.Time
	// contains filtered or unexported fields
}

Adder holds the switches passed to the `add` command.

func NewAdder added in v0.4.0

func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCLocker, ds ipld.DAGService) (*Adder, error)

NewAdder Returns a new Adder used for a file add operation.

func (*Adder) AddAllAndPin added in v0.4.18

func (adder *Adder) AddAllAndPin(ctx context.Context, file files.Node) (ipld.Node, error)

AddAllAndPin adds the given request's files and pin them.

func (*Adder) PinRoot added in v0.4.0

func (adder *Adder) PinRoot(ctx context.Context, root ipld.Node, name string) error

PinRoot recursively pins the root node of Adder with an optional name and writes the pin state to the backing datastore. If name is empty, the pin will be created without a name.

func (*Adder) SetMfsRoot added in v0.4.3

func (adder *Adder) SetMfsRoot(r *mfs.Root)

SetMfsRoot sets `r` as the root for Adder.

type Link struct {
	Name, Hash string
	Size       uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL