Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface {
// Filter - function accepts or rejects file
Filter(file fs.DirEntry) bool
// Format - function returns formatted text for selected files
Format(file fs.DirEntry, folder *Folder) string
}
Builder - required functions
type Folder ¶
type Folder struct {
// Source - path of origin
Source string
// Destination - output path of file operations
Destination string
// Script - file name of stored generated text
Script string
// Code - generated formatted text
Code string
// Files - list of filtered files
Files []fs.DirEntry
// Children - sub folders
Children []string
}
Folder - properties collected during scan
type Folders ¶
type Folders []*Folder
Folders - collection
func Build ¶
func Build(in, out, script string, builder Builder, write bool, verbose bool) (folders Folders, err error)
Build - returns input scan results in folders arguments:
in - input base out - output base script - name of generated script builder - Builder interface to filter files and format scripts write - create folders and generate scripts verbose - display messages
Click to show internal directories.
Click to hide internal directories.