Documentation
¶
Index ¶
- Constants
- type Handler
- func (h *Handler) AppendKeyToContent(content, key, value string) string
- func (h *Handler) CreateDirectory(path string) error
- func (h *Handler) CreateSymlink(target, link string) error
- func (h *Handler) EnsureDirectory(path string) error
- func (h *Handler) FileExists(path string) bool
- func (h *Handler) FindKeyInContent(content, key string) (int, bool)
- func (h *Handler) GetAbsolutePath(path string) (string, error)
- func (h *Handler) GetDirectory(path string) string
- func (h *Handler) GetFilePath(basePath, filename string) (string, error)
- func (h *Handler) GetProjectPath(projectDir string) (string, error)
- func (h *Handler) GetRelativePath(base, target string) (string, error)
- func (h *Handler) GetSubPath(basePath, subDir string) (string, error)
- func (h *Handler) GetWorkingDirectory() (string, error)
- func (h *Handler) JoinPaths(paths ...string) string
- func (h *Handler) ReadFile(path string) (string, error)
- func (h *Handler) ReadSymlink(link string) (string, error)
- func (h *Handler) RemoveFile(path string) error
- func (h *Handler) UpdateKeyInContent(content, key, value string, keyIndex int) string
- func (h *Handler) WriteFile(path, content string) error
Constants ¶
View Source
const ( // File permissions DirPerms = 0755 FilePerms = 0600 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct{}
func NewHandler ¶
func NewHandler() *Handler
func (*Handler) AppendKeyToContent ¶
func (*Handler) CreateDirectory ¶
func (*Handler) CreateSymlink ¶
func (*Handler) EnsureDirectory ¶
Directory operations
func (*Handler) FileExists ¶
func (*Handler) FindKeyInContent ¶
func (*Handler) GetDirectory ¶
func (*Handler) GetFilePath ¶
func (*Handler) GetProjectPath ¶
Generic path builders
func (*Handler) GetRelativePath ¶
func (*Handler) GetWorkingDirectory ¶
func (*Handler) RemoveFile ¶
func (*Handler) UpdateKeyInContent ¶
Click to show internal directories.
Click to hide internal directories.