dir

package
v0.0.0-...-e9e1808 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: ISC Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fgetxattr

func Fgetxattr(file Fd, attr string) ([]byte, error)

func Flistxattr

func Flistxattr(file Fd) ([]string, error)

Types

type Fd

type Fd interface {
	Fd() uintptr
}

type Provider

type Provider struct{}

func (Provider) CAS

func (p Provider) CAS() (api.CAS, api.CloseWaitFunc, error)

func (Provider) CASReader

func (p Provider) CASReader() (api.CASReader, api.CloseWaitFunc, error)

func (Provider) CASWriter

func (p Provider) CASWriter() (api.CASWriter, api.CloseWaitFunc, error)

func (Provider) Name

func (p Provider) Name() string

func (Provider) SinkBuilder

func (p Provider) SinkBuilder() provider.SinkBuilder

func (Provider) SourceBuilder

func (p Provider) SourceBuilder() provider.SourceBuilder

type Source

type Source struct {
	// contains filtered or unexported fields
}

func (*Source) Next

func (s *Source) Next() (api.SourceNode, error)

func (*Source) Open

func (s *Source) Open(sri string) (io.ReadCloser, error)

type SourceBuilder

type SourceBuilder struct {
	Dir          string
	SRIAlgorithm sri.Algorithm `abstractfs:"cas-algorithm"`
	// KeepPrefix will keep the prefix of the dir.
	// If set, the dir path prefix will be removed from the node path.
	// If not set, the node path will be the real path of the node.
	// For example, if the node has the real path /foo/bar and the dir is /foo,
	// the node path will be /foo/bar if KeepPrefix is set and /bar if not.
	KeepPrefix     bool `abstractfs:"keep-prefix"`
	PreserveXAttrs bool `abstractfs:"preserve-xattrs"`
	// contains filtered or unexported fields
}

func (*SourceBuilder) Build

func (b *SourceBuilder) Build() (api.Source, api.CloseWaitFunc, error)

Build builds the options.

func (*SourceBuilder) WithKeepPrefix

func (b *SourceBuilder) WithKeepPrefix(keepPrefix bool) *SourceBuilder

func (*SourceBuilder) WithPreserveXAttrs

func (b *SourceBuilder) WithPreserveXAttrs(preserveXAttrs bool) *SourceBuilder

func (*SourceBuilder) WithSRIAlgorithm

func (b *SourceBuilder) WithSRIAlgorithm(alg sri.Algorithm) *SourceBuilder

func (*SourceBuilder) WithSourceRef

func (b *SourceBuilder) WithSourceRef(ref string) provider.SourceBuilder

WithSourceRef sets the source reference.

Jump to

Keyboard shortcuts

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