Documentation
¶
Overview ¶
Package sync provides a one-way sync engine that mirrors a pCloud directory tree to a local directory. Only files that are newer on pCloud are downloaded. Files deleted from pCloud are removed locally.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RunResult ¶
type RunResult struct {
Total int // total files found on pCloud
Downloaded int // files downloaded (new or updated)
Deleted int // local files removed (no longer on pCloud)
Warnings int // files that failed with a non-fatal error
}
RunResult summarises the outcome of a single sync pass.
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer mirrors a pCloud directory tree to a local directory.
func New ¶
New creates a Syncer. cloudRoot is the pCloud source path; localRoot is the destination directory on disk. Progress messages are written to log.
type Uploader ¶ added in v1.2.0
type Uploader struct {
// contains filtered or unexported fields
}
Uploader syncs a local directory tree to a pCloud directory. Files absent on pCloud or locally newer are uploaded. Remote files no longer present locally are deleted from pCloud.
func NewUploader ¶ added in v1.2.0
NewUploader creates an Uploader. localRoot is the source on disk; cloudRoot is the pCloud destination path.