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

Function ShareDir

internal/utils/systems.go:46–51  ·  view source on GitHub ↗

ShareDir generates the share directory for the cli.

()

Source from the content-addressed store, hash-verified

44
45// ShareDir generates the share directory for the cli.
46func ShareDir() string {
47 if IsWindows() {
48 return path.Join(UserHomeDir(), "AppData/LocalLow/catppuccin-cli")
49 }
50 return path.Join(GetEnv("XDG_DATA_HOME", HandleDir("~/.local/")), "share/catppuccin-cli")
51}
52
53// OSReadDir expands a directory path into a list of files within that directory. Not recursive.
54func OSReadDir(root string) ([]string, error) {

Callers 6

RemoveInstalledFunction · 0.92
updaterFunction · 0.92
searchPackageFunction · 0.92
installerFunction · 0.92
MakeLocationFunction · 0.85
UpdateJSONFunction · 0.85

Calls 4

IsWindowsFunction · 0.85
UserHomeDirFunction · 0.85
GetEnvFunction · 0.85
HandleDirFunction · 0.85

Tested by

no test coverage detected