putlib

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Config{FilterName: ".ffsignore"}

Functions

func SetPath

func SetPath(ctx context.Context, s config.CAS, path string, tf *file.File) (string, error)

SetPath sets the specified root-key/path or file-key/path to the given target file. It returns the storage key of the resulting updated object.

If path has only a root-key, the base file of that root is replaced. If path has only a file-keyi, it is an error.

Types

type Config

type Config struct {
	Verbose    bool   // emit diagnostic output
	XAttr      bool   // capture extended attributes
	NoStat     bool   // do not capture stat metadata
	FilterName string // name of filter file to read
}

func (Config) PutFile

func (c Config) PutFile(ctx context.Context, s blob.CAS, path string, fi fs.FileInfo) (*file.File, error)

PutFile puts a single file or symlink into the store.

func (Config) PutPath

func (c Config) PutPath(ctx context.Context, s blob.CAS, path string) (*file.File, error)

PutPath puts a single file, directory, or symlink into the store. If path names a plain file or symlink, it calls PutFile.

Jump to

Keyboard shortcuts

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