Documentation ¶
Index ¶
- func BackupFiles(files ...*cf.ConfigFile) error
- func CheckIfGlobsMatch(file string, patterns ...string) bool
- func DeleteFiles(restore bool, files ...*cf.ConfigFile) error
- func FindFiles(rootPath string, igContainer ignorefile.IIgnoresContainer, patterns ...string) (files []*configfile.ConfigFile, err error)
- func MakeFilesBrowsable(baseDir string, files ...*cf.ConfigFile) error
- func RestoreFiles(files ...*cf.ConfigFile) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupFiles ¶ added in v1.4.0
func BackupFiles(files ...*cf.ConfigFile) error
Backs up the files to the backup directory. And creates a symlink to the backup files at the original file locations.
func CheckIfGlobsMatch ¶
Checks if the given file matches any of the given patterns.
func DeleteFiles ¶ added in v1.4.0
func DeleteFiles(restore bool, files ...*cf.ConfigFile) error
Deletes the files from the backup directory.
func FindFiles ¶
func FindFiles(rootPath string, igContainer ignorefile.IIgnoresContainer, patterns ...string) (files []*configfile.ConfigFile, err error)
FindFiles finds files in the given rootPath that match the given patterns.
func MakeFilesBrowsable ¶ added in v1.5.0
func MakeFilesBrowsable(baseDir string, files ...*cf.ConfigFile) error
Creates a browsable replica of the backedup config files at `baseDir`.
func RestoreFiles ¶ added in v1.4.0
func RestoreFiles(files ...*cf.ConfigFile) error
Restores the files from the backup directory. Tidies the mapfile before execution.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.