MCPcopy Create free account
hub / github.com/catppuccin/cli / HandleFilePath

Function HandleFilePath

internal/utils/symlinks.go:118–128  ·  view source on GitHub ↗

HandleFilePath handles files that are made with symlinks

(finalDir string, name string)

Source from the content-addressed store, hash-verified

116
117// HandleFilePath handles files that are made with symlinks
118func HandleFilePath(finalDir string, name string) {
119 // Check if dir to link already exists
120 fileFolder, _ := path.Split(name)
121 fullDir := path.Join(finalDir, fileFolder)
122 if !PathExists(fullDir) {
123 err := os.Mkdir(fullDir, 0o755)
124 if err != nil {
125 log.Error("Failed to create parent directory.")
126 }
127 }
128}
129
130// InstallLinks is a wrapper over MakeLinks that parses the mode and uses it to create the correct link, as specified by the ctprc.
131func InstallLinks(baseDir string, entry structs.Entry, to string, finalDir string, mode string) []string {

Callers 1

MakeLinksFunction · 0.85

Calls 2

PathExistsFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected