Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPlan ¶
func ApplyPlan(ctx context.Context, srcFS FileSystem, dstFS FileSystem, plan *Plan, options ApplyOptions) error
Types ¶
type ApplyOptions ¶
type CommandArgs ¶
type CommandArgs struct {
Delete bool
Permission bool
ParallelNum int
Sources []string
Destination string
}
func ParseCommandArgs ¶
func ParseCommandArgs(args []string) (CommandArgs, error)
type DeleteScope ¶
type DesiredEntry ¶
type FileSystem ¶
type FileSystem interface {
Expand(raw string) ([]string, error)
Resolve(raw string) (string, error)
Stat(path string) (fs.FileInfo, error)
Walk(root string, fn func(path string, info fs.FileInfo) error) error
Open(path string) (io.ReadCloser, error)
OpenWriter(path string, perm fs.FileMode) (io.WriteCloser, error)
MkdirAll(path string) error
Remove(path string) error
RemoveDir(path string) error
Chmod(path string, mode fs.FileMode) error
Chtimes(path string, atime, mtime time.Time) error
Clean(path string) string
Join(elem ...string) string
Dir(path string) string
Separator() string
}
func NewLocalFS ¶
func NewLocalFS() (FileSystem, error)
func NewRemoteFS ¶
func NewRemoteFS(client *sftp.Client, pwd string) FileSystem
type PathSpec ¶
func ParsePathSpec ¶
type Plan ¶
type Plan struct {
Desired map[string]DesiredEntry
DeleteScopes []DeleteScope
}
func BuildPlan ¶
func BuildPlan(srcFS FileSystem, dstFS FileSystem, sourceArgs []string, destination string) (*Plan, error)
type Sync ¶
type SyncConnect ¶
Click to show internal directories.
Click to hide internal directories.