Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PairFilters ¶ added in v1.1.0
PairFilters combines a pair's config-level exclude patterns with any .driveignore file found at localRoot into a single translated rclone filter-rule list. exclude entries come first, then the .driveignore file's lines - so, under gitignore's last-match-wins semantics, a folder's own .driveignore can override a pattern set in the pair's config. This lets a pair (e.g. a real user directory like ~/.claude) be excluded entirely via config, with no .driveignore file ever written into that directory.
func ResolveRcloneConfig ¶ added in v1.1.0
ResolveRcloneConfig returns the rclone config path to hand librclone: the explicit value if non-empty, else the first existing default location. The scoop portable rclone.conf (adjacent to the scoop rclone binary) is only found by the rclone CLI, not by librclone's default (%APPDATA%), so probe it first, then %APPDATA%. Returns "" if none exist (librclone falls back to its own default).
func TranslateDriveIgnore ¶
TranslateDriveIgnore reads the .driveignore file at localRoot (if any) and translates it to rclone filter rules. Returns (nil, nil) when no .driveignore file exists.
func TranslateIgnoreLines ¶ added in v1.1.0
TranslateIgnoreLines converts a list of gitignore-syntax lines (blank lines and "#" comments are skipped) into rclone filter rules ("+ "/"- " prefixed patterns), ready for a bisync filters file or an rc _filter.FilterRule list.
gitignore: last-match-wins. rclone filter: first-match-wins. The lines are reversed as a whole after translation so later negations (which must win under gitignore semantics) are checked before the rules they negate.
Types ¶
type Config ¶
type Pair ¶
type Pair struct {
Local string
Remote string
Interval time.Duration
Mode string
// Exclude holds config-level gitignore-syntax patterns for this pair,
// combined with any .driveignore file at Local by PairFilters. Lets a
// pair (e.g. ~/.claude) exclude paths (node_modules, .venv, caches) from
// the config itself instead of requiring a .driveignore file dropped
// into a real user directory.
Exclude []string
}