fileop

package
v0.0.0-...-b94449b Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package fileop contains filesystem-related operators.

TODO have cp op that works exactly the same as gnu cp, then have cp-dir, cp-atomic, cp-plan, cp-secret

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checksum

func Checksum(p string) ([]byte, error)

func ChecksumReader

func ChecksumReader(r io.Reader) ([]byte, error)

func ModeLabel

func ModeLabel(mode fs.FileMode) string

Types

type AtomicCopy

type AtomicCopy struct {
	Args interface{}
}

func (AtomicCopy) GetState

func (op AtomicCopy) GetState(octx operator.Context) (state.State, error)

func (AtomicCopy) Info

func (op AtomicCopy) Info() operator.Info

func (AtomicCopy) Run

func (op AtomicCopy) Run(octx operator.Context) error

func (AtomicCopy) String

func (op AtomicCopy) String() string

type AtomicCopyOpts

type AtomicCopyOpts struct {
	Sources      []string `json:"sources"`
	Dest         string   `json:"dest"`
	ExcludeGlobs []string `json:"exclude,omitempty"`
}

type Copy

type Copy struct {
	Args interface{}
}

func (Copy) GetState

func (op Copy) GetState(octx operator.Context) (state.State, error)

func (Copy) Info

func (op Copy) Info() operator.Info

func (Copy) Run

func (op Copy) Run(octx operator.Context) error

type CopyOpts

type CopyOpts struct {
	Sources      []string `json:"sources"`
	Dest         string   `json:"dest"`
	ExcludeGlobs []string `json:"exclude,omitempty"`
}

type Mkdir

type Mkdir struct {
	Args interface{}
}

func (Mkdir) GetState

func (op Mkdir) GetState(octx operator.Context) (state.State, error)

func (Mkdir) Info

func (op Mkdir) Info() operator.Info

func (Mkdir) Run

func (op Mkdir) Run(octx operator.Context) error

func (Mkdir) String

func (op Mkdir) String() string

type MkdirOpts

type MkdirOpts struct {
	Dests []string `json:"dests"`
	Mode  uint32   `json:"mode,omitempty"`
}

type Pcopy

type Pcopy struct {
	Args interface{}
}

func (Pcopy) GetState

func (op Pcopy) GetState(octx operator.Context) (state.State, error)

func (Pcopy) Info

func (op Pcopy) Info() operator.Info

func (Pcopy) Run

func (op Pcopy) Run(octx operator.Context) error

type PcopyOpts

type PcopyOpts struct {
	Sources      []string `json:"sources"`
	Dest         string   `json:"dest"`
	ExcludeGlobs []string `json:"exclude,omitempty"`
}

type Touch

type Touch struct {
	Args interface{}
}

func (Touch) GetState

func (op Touch) GetState(octx operator.Context) (state.State, error)

func (Touch) Info

func (op Touch) Info() operator.Info

func (Touch) Run

func (op Touch) Run(octx operator.Context) error

func (Touch) String

func (op Touch) String() string

type TouchOpts

type TouchOpts struct {
	Mode uint32 `json:"mode,omitempty"`
	Path string `json:"path"`
}

Jump to

Keyboard shortcuts

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