Documentation ¶
Overview ¶
Package plan provides functions that are associated with the Plan and the type of the same name.
Index ¶
- Variables
- type Plan
- func (p *Plan) CreatePlan(planfile string) error
- func (p *Plan) Execute() (errOccured bool, errorDescs []string, errs []error)
- func (p *Plan) GetFileList() []string
- func (p *Plan) LoadFileList(files []string, recursive bool)
- func (p *Plan) PrepareExecution() error
- func (p *Plan) PreviewPlan()
- func (p *Plan) StartEditing() error
- func (p *Plan) TempFile() string
Constants ¶
This section is empty.
Variables ¶
View Source
var L *logmatic.Logger
L contains the Logger used to log stuff
Functions ¶
This section is empty.
Types ¶
type Plan ¶
type Plan struct { // TempID contains the id of the Plan (i.e. the unique identifier of the job. TempID string // InFiles contains the paths of the files before renaming InFiles []string // OutFiles contains the paths of the files after renaming OutFiles []string // AbsolutePaths indicates whether to use absolute paths or not AbsolutePaths bool // Overwrite indicates whether existing files shall be overwritten Overwrite bool // Editor contains the Editor to use for editing Editor string // EditorArgs contains the arguments that will be passed to the editor. {} will be replaced by the absolute path to the plan-file. EditorArgs []string // CreateDirs indicates whether non-existent directories should be created as needed CreateDirs bool // StopToShow indicates whether an overview of the applied actions should be shown and confirmation requested StopToShow bool // DeleteEmpty indicates whether files corresponding with empty lines should be deleted DeleteEmpty bool // contains filtered or unexported fields }
Plan stores all information on a rename-job. and provides related funtions.
func (*Plan) CreatePlan ¶
CreatePlan reads the new filenames from the temporary file
func (*Plan) GetFileList ¶
GetFileList returns a list of the files to edit
func (*Plan) LoadFileList ¶
LoadFileList loads the list of files into the Plan-Type
func (*Plan) PrepareExecution ¶
PrepareExecution creates a set of prerules that need to be executed in order to execute the actual plan.
func (*Plan) PreviewPlan ¶
func (p *Plan) PreviewPlan()
PreviewPlan prints a preview of the plan that is to be executed
func (*Plan) StartEditing ¶
StartEditing launches the editor and loads the required file for editing
Directories ¶
Path | Synopsis |
---|---|
Package jobdescriptor provides a type to store information of a job in
|
Package jobdescriptor provides a type to store information of a job in |
Click to show internal directories.
Click to hide internal directories.