Documentation
¶
Index ¶
- type DefaultManager
- func (m *DefaultManager) EnsureDir(path string) error
- func (m *DefaultManager) FileExists(path string) bool
- func (m *DefaultManager) ReadFile(path string) ([]byte, error)
- func (m *DefaultManager) WriteFile(path string, content []byte) error
- func (m *DefaultManager) WriteObjectAsYAML(path string, object interface{}) error
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultManager ¶
type DefaultManager struct {
}
DefaultManager implements the Manager interface
func (*DefaultManager) EnsureDir ¶
func (m *DefaultManager) EnsureDir(path string) error
EnsureDir creates a directory if it doesn't exist
func (*DefaultManager) FileExists ¶
func (m *DefaultManager) FileExists(path string) bool
FileExists checks if a file exists
func (*DefaultManager) ReadFile ¶
func (m *DefaultManager) ReadFile(path string) ([]byte, error)
ReadFile reads content from a file
func (*DefaultManager) WriteFile ¶
func (m *DefaultManager) WriteFile(path string, content []byte) error
WriteFile writes content to a file, creating directories as needed
func (*DefaultManager) WriteObjectAsYAML ¶
func (m *DefaultManager) WriteObjectAsYAML(path string, object interface{}) error
WriteObjectAsYAML marshals an object to YAML and writes it to a file
type Manager ¶
type Manager interface {
EnsureDir(path string) error
WriteFile(path string, content []byte) error
ReadFile(path string) ([]byte, error)
FileExists(path string) bool
WriteObjectAsYAML(path string, object interface{}) error
}
Manager provides file operation functionality
func NewFileOpsManager ¶
func NewFileOpsManager() Manager
NewFileOpsManager creates a new default file manager
Click to show internal directories.
Click to hide internal directories.