Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveDate ¶ added in v0.8.0
ResolveDate picks the calendar date a file is filed under, honoring the same date sources the planner supports for sorting. It is exported so other commands (chest rename) can reuse the exact same date semantics instead of re-implementing them: an empty or unknown source behaves as "modified".
Types ¶
type Option ¶ added in v0.4.0
type Option func(*Planner)
Option configures planner behavior without changing the existing constructor signature.
func WithDate ¶ added in v0.4.0
WithDate configures date placeholders and generated date sorting. monthFormat is "name" (Jan) or "number" (01); anything else behaves as "name".
func WithHashCollisions ¶ added in v0.8.0
func WithHashCollisions() Option
WithHashCollisions turns on content-aware conflict resolution. Only the files that actually collide on a destination are hashed, never the whole tree: a genuine duplicate (identical SHA-256) is left in place instead of being auto-renamed, while distinct content keeps the normal auto-rename. Without this option no file is opened and planning is byte-for-byte the behavior it has always had.
type Planner ¶
type Planner struct {
// contains filtered or unexported fields
}
Planner builds the filesystem execution plan
func New ¶
func New(engine *rules.Engine, baseDestination string, collisionPolicy models.CollisionPolicy, opts ...Option) *Planner
New creates a new Planner