service

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeSyncActions

func ComputeSyncActions(sourceDirPath string, sourceFiles map[string]entity.FileMeta, orphansAtSource []string,
	destinationDirPath string, destinationFiles map[string]entity.FileMeta, candidatesAtDestination []string,
	sourceCounter *int32, destinationCounter *int32,
) (actions []action.SyncAction, savings int64, err error)

ComputeSyncActions identifies the diff between source and destination directories that do not require actual file transfer. This is the core function of this tool.

func FindDirectoryResultToCsv added in v1.3.0

func FindDirectoryResultToCsv(dirPath string, excludedFiles set.Set[string], file *os.File) error

func FindFilesFromDirectory added in v1.3.0

func FindFilesFromDirectory(dirPath string, excludedFiles set.Set[string]) (
	files map[string]entity.FileMeta,
	totalSizeOfFiles int64,
	findFilesErr error,
)

FindFilesFromDirectory finds all regular files in a given directory (Very similar to `find` command on unix-like operating systems)

func FindOrphans

func FindOrphans(sourceFiles, destinationFiles map[string]entity.FileMeta) []string

FindOrphans finds files at source that do not have corresponding files at destination. File at destination must exist and have same size and same modified timestamp.

Types

This section is empty.

Jump to

Keyboard shortcuts

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