Documentation
¶
Index ¶
- type BackupManager
- type FileOperations
- func (f *FileOperations) AreIdentical(src, dst string) (bool, error)
- func (f *FileOperations) CalculateHash(path string) (string, error)
- func (f *FileOperations) Copy(src, dst string) error
- func (f *FileOperations) Remove(path string) error
- func (f *FileOperations) ResolveSymlink(path string) (string, error)
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupManager ¶
type BackupManager struct {
// contains filtered or unexported fields
}
func NewBackupManager ¶
func NewBackupManager(cfg *config.Config, fileOps *FileOperations, log *logger.Logger) *BackupManager
func (*BackupManager) Backup ¶
func (b *BackupManager) Backup(filePath string) error
func (*BackupManager) Clear ¶
func (b *BackupManager) Clear() error
func (*BackupManager) GetBackupPath ¶
func (b *BackupManager) GetBackupPath(originalPath string) string
func (*BackupManager) Restore ¶
func (b *BackupManager) Restore(filePath string) error
type FileOperations ¶
type FileOperations struct {
// contains filtered or unexported fields
}
func NewFileOperations ¶
func NewFileOperations(dryRun bool) *FileOperations
func (*FileOperations) AreIdentical ¶
func (f *FileOperations) AreIdentical(src, dst string) (bool, error)
func (*FileOperations) CalculateHash ¶
func (f *FileOperations) CalculateHash(path string) (string, error)
func (*FileOperations) Copy ¶
func (f *FileOperations) Copy(src, dst string) error
func (*FileOperations) Remove ¶
func (f *FileOperations) Remove(path string) error
func (*FileOperations) ResolveSymlink ¶
func (f *FileOperations) ResolveSymlink(path string) (string, error)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) ClearCache ¶
Click to show internal directories.
Click to hide internal directories.