Documentation ¶
Index ¶
- type FUInitializer
- type FileInterface
- type FileOperator
- type FileUtilsInitImpl
- type 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FUInitializer ¶
type FUInitializer interface {
NewFileutils(partDir string, prefixParts string, log logger.LoggerInterface) FileInterface
}
type FileInterface ¶
type FileOperator ¶
type FileOperator interface { Remove(name string) error Create(name string) (*os.File, error) ReadFile(name string) ([]byte, error) Open(name string) (*os.File, error) WriteFile(filename string, data []byte, perm os.FileMode) error WriteEncryptedFile(filename string, data []byte, key []byte, perm os.FileMode) error }
type FileUtilsInitImpl ¶
type FileUtilsInitImpl struct { }
func (*FileUtilsInitImpl) NewFileutils ¶
func (fu *FileUtilsInitImpl) NewFileutils(partsDir string, prefixParts string, log logger.LoggerInterface) FileInterface
type Fileutils ¶
type Fileutils struct { PartsDir string PrefixParts string Log logger.LoggerInterface }
func NewFileutils ¶
func NewFileutils(partsDir string, prefixParts string, log logger.LoggerInterface) *Fileutils
func (*Fileutils) CombinedMD5HashForPrefixedFiles ¶
func (*Fileutils) EnsureAppRoot ¶
func (*Fileutils) ExtractPathAndFilename ¶
ExtractDirFilename extracts the directory and filename from a given path.
func (*Fileutils) LoadConfig ¶
func (*Fileutils) PathExists ¶
func (*Fileutils) ProcessPartsDir ¶
func (*Fileutils) RemoveExtensions ¶
func (*Fileutils) RemovePartsOrDirectory ¶
func (*Fileutils) SetLogger ¶
func (f *Fileutils) SetLogger(log logger.LoggerInterface)
func (*Fileutils) ValidateCreatePath ¶
type RealFileUtils ¶
type RealFileUtils struct {
Init *Fileutils
}
func (*RealFileUtils) PathExists ¶
func (fu *RealFileUtils) PathExists(path string) bool
Click to show internal directories.
Click to hide internal directories.