file

package
v2.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup added in v2.2.0

type Backup struct {
	Changes     Changes  `json:"changes"`
	CleanedDirs []string `json:"cleaned_dirs,omitempty"`
}

func (Backup) RenderJSON added in v2.2.0

func (b Backup) RenderJSON(w io.Writer) error

type Change

type Change struct {
	Error         error                  `json:"error,omitempty"`
	PrimaryPair   *Change                `json:"-"`
	ExiftoolData  *exiftool.FileMetadata `json:"-"`
	BaseDir       string                 `json:"base_dir"`
	TargetDir     string                 `json:"target_dir"`
	Source        string                 `json:"source"`
	Target        string                 `json:"target"`
	OriginalName  string                 `json:"-"`
	Status        status.Status          `json:"status"`
	SourcePath    string                 `json:"-"`
	TargetPath    string                 `json:"-"`
	CSVRow        []string               `json:"-"`
	Steps         []string               `json:"-"`
	SortCriterion struct {
		TimeVar   time.Time
		Time      time.Time
		StringVar string
		IntVar    int
		Size      int64
	} `json:"-"`
	Position        int  `json:"-"`
	IsDir           bool `json:"is_dir"`
	WillOverwrite   bool `json:"-"`
	MatchesFindCond bool `json:"-"`
}

Change represents a single renaming change.

func (*Change) AutoFixTarget

func (c *Change) AutoFixTarget(newTarget string)

AutoFixTarget sets the new target name.

func (*Change) LogValue added in v2.2.0

func (c *Change) LogValue() slog.Value

type Changes

type Changes []*Change

func (Changes) LogValue added in v2.2.0

func (c Changes) LogValue() slog.Value

func (Changes) RenderJSON

func (c Changes) RenderJSON(w io.Writer) error

func (Changes) RenderTable

func (c Changes) RenderTable(w io.Writer, noColor bool)

func (Changes) ShouldExtractExiftool added in v2.2.0

func (c Changes) ShouldExtractExiftool() bool

func (Changes) SourceNamesWithIndices added in v2.2.0

func (c Changes) SourceNamesWithIndices(
	withPair bool,
) (names []string, indices []int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL