files

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path     string
	File     fs.FileInfo
	Category FileCategory
}

func ListFiles

func ListFiles(conf config.Configuration, sourcePath string, extensions []string, category FileCategory) ([]File, uint)

func (File) ExtractFile

func (file File) ExtractFile(conf config.Configuration, dest string) error

func (File) GenerateDestinationPath

func (file File) GenerateDestinationPath(conf config.Configuration) string

Returns a string with the destination path of the given file.

List of available verbs:

  • %y: Year
  • %m: Month
  • %d: Day
  • %n: Camera name
  • %t: Media type (Pictures, RAW, Movies)

func (File) PrepareFileDestinationFolder

func (file File) PrepareFileDestinationFolder(conf config.Configuration) (string, error)

type FileCategory

type FileCategory int8
const (
	FC_PICTURE FileCategory = iota
	FC_RAW
	FC_MOVIE
)

type Files

type Files struct {
	Pictures     []File
	RAW          []File
	Movies       []File
	TotalFiles   uint
	SkippedFiles uint
}

func CollectFiles

func CollectFiles(conf config.Configuration) Files

Jump to

Keyboard shortcuts

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