Versions in this module Expand all Collapse all v0 v0.1.32 Sep 12, 2023 Changes in this version + type FUInitializer interface + NewFileutils func(partDir string, prefixParts string, log logger.LoggerInterface) FileInterface + type FileInterface interface + PathExists func(path string) bool + type FileOperator interface + Create func(name string) (*os.File, error) + Open func(name string) (*os.File, error) + ReadFile func(name string) ([]byte, error) + Remove func(name string) error + WriteEncryptedFile func(filename string, data []byte, key []byte, perm os.FileMode) error + WriteFile func(filename string, data []byte, perm os.FileMode) error + type FileUtilsInitImpl struct + func (fu *FileUtilsInitImpl) NewFileutils(partsDir string, prefixParts string, log logger.LoggerInterface) FileInterface + type Fileutils struct + Log logger.LoggerInterface + PartsDir string + PrefixParts string + func NewFileutils(partsDir string, prefixParts string, log logger.LoggerInterface) *Fileutils + func (f *Fileutils) CombinedMD5HashForPrefixedFiles(dir string, prefix string) (string, error) + func (f *Fileutils) CreateFile(filePath string) (*os.File, error) + func (f *Fileutils) EnsureAppRoot() (string, error) + func (f *Fileutils) ExtractPathAndFilename(path string) (string, string, error) + func (f *Fileutils) LoadConfig(v *viper.Viper, configName string, configPath string) error + func (f *Fileutils) PathExists(path string) bool + func (f *Fileutils) ProcessPartsDir() error + func (f *Fileutils) RemoveExtensions(filename string) string + func (f *Fileutils) RemovePartsOrDirectory(u *utils.Utils, keepParts bool, partsDir string, appRoot string, ...) error + func (f *Fileutils) SetLogger(log logger.LoggerInterface) + func (f *Fileutils) ValidateCreatePath(path string) error + func (f *Fileutils) ValidatePath(path string) (string, error) + type RealFileUtils struct + Init *Fileutils + func (fu *RealFileUtils) PathExists(path string) bool