MCPcopy Index your code
hub / github.com/spicetify/cli / GetCustomAppPath

Function GetCustomAppPath

src/utils/path-utils.go:186–208  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

184}
185
186func GetCustomAppPath(name string) (string, error) {
187 customAppFolderPath := filepath.Join(userAppsFolder, name)
188
189 if _, err := os.Stat(customAppFolderPath); err == nil {
190 customAppActualFolderPath := GetCustomAppSubfolderPath(customAppFolderPath)
191 if customAppActualFolderPath != "" {
192 return customAppActualFolderPath, nil
193 }
194 return customAppFolderPath, nil
195 }
196
197 customAppFolderPath = filepath.Join(GetExecutableDir(), "CustomApps", name)
198
199 if _, err := os.Stat(customAppFolderPath); err == nil {
200 customAppActualFolderPath := GetCustomAppSubfolderPath(customAppFolderPath)
201 if customAppActualFolderPath != "" {
202 return customAppActualFolderPath, nil
203 }
204 return customAppFolderPath, nil
205 }
206
207 return "", errors.New("custom app not found")
208}
209
210func GetExtensionPath(name string) (string, error) {
211 extFilePath := filepath.Join(userExtensionsFolder, name)

Callers 5

RefreshAppsFunction · 0.92
AppPathFunction · 0.92
AppAllPathFunction · 0.92
WatchCustomAppFunction · 0.92
GetAppManifestFunction · 0.85

Calls 2

GetExecutableDirFunction · 0.85

Tested by

no test coverage detected