Documentation
¶
Index ¶
- func Changes(ctx context.Context, a, b walkerFn, changeFn ChangeFunc) error
- func ComparePath(p1, p2 string) int
- func FollowLinks(root string, paths []string) ([]string, error)
- func Receive(ctx context.Context, conn Stream, dest string, opt ReceiveOpt) error
- func Send(ctx context.Context, conn Stream, fs FS, progressCb func(int, bool)) error
- func Stat(path string) (*types.Stat, error)
- func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) error
- func WriteTar(ctx context.Context, fs FS, w io.Writer) error
- type ChangeFunc
- type ChangeKind
- type ContentHasher
- type DiffType
- type Dir
- type DiskWriter
- type DiskWriterOpt
- type FS
- type FilterFunc
- type HandleChangeFn
- type Hardlinks
- type MapFunc
- type MapResult
- type ReceiveOpt
- type StatInfo
- type Stream
- type Validator
- type WalkOpt
- type WriteToFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePath ¶
Types ¶
type ChangeFunc ¶
ChangeFunc is the type of function called for each change computed during a directory changes calculation.
type ChangeKind ¶
type ChangeKind int
ChangeKind is the type of modification that a change is making.
const ( // ChangeKindAdd represents an addition of // a file ChangeKindAdd ChangeKind = iota // ChangeKindModify represents a change to // an existing file ChangeKindModify // ChangeKindDelete represents a delete of // a file ChangeKindDelete )
func (ChangeKind) String ¶
func (k ChangeKind) String() string
type DiskWriter ¶
type DiskWriter struct {
// contains filtered or unexported fields
}
func NewDiskWriter ¶
func NewDiskWriter(ctx context.Context, dest string, opt DiskWriterOpt) (*DiskWriter, error)
func (*DiskWriter) HandleChange ¶
func (dw *DiskWriter) HandleChange(kind ChangeKind, p string, fi os.FileInfo, err error) (retErr error)
type DiskWriterOpt ¶
type DiskWriterOpt struct { AsyncDataCb WriteToFunc SyncDataCb WriteToFunc NotifyCb func(ChangeKind, string, os.FileInfo, error) error ContentHasher ContentHasher Filter FilterFunc }
type FS ¶
type HandleChangeFn ¶
type Hardlinks ¶
type Hardlinks struct {
// contains filtered or unexported fields
}
func (*Hardlinks) HandleChange ¶
type MapResult ¶
type MapResult int
The result of the walk function controls both how WalkDir continues and whether the path is kept.
const ( // Keep the current path and continue. MapResultKeep MapResult = iota // Exclude the current path and continue. MapResultExclude // Exclude the current path, and skip the rest of the dir. // If path is a dir, skip the current directory. // If path is a file, skip the rest of the parent directory. // (This matches the semantics of fs.SkipDir.) MapResultSkipDir )
type ReceiveOpt ¶
type ReceiveOpt struct { NotifyHashed ChangeFunc ContentHasher ContentHasher ProgressCb func(int, bool) Merge bool Filter FilterFunc Differ DiffType }
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func (*Validator) HandleChange ¶
type WriteToFunc ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.