38 lines
972 B
Go
38 lines
972 B
Go
//go:build darwin
|
|
|
|
package scanner
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
func GetScanTargets(category string) []string {
|
|
home, _ := os.UserHomeDir()
|
|
switch category {
|
|
case "apps":
|
|
return []string{"/Applications", filepath.Join(home, "Applications")}
|
|
case "photos":
|
|
return []string{filepath.Join(home, "Pictures")}
|
|
case "icloud":
|
|
return []string{filepath.Join(home, "Library", "Mobile Documents")}
|
|
case "docs":
|
|
return []string{filepath.Join(home, "Documents")}
|
|
case "downloads":
|
|
return []string{filepath.Join(home, "Downloads")}
|
|
case "desktop":
|
|
return []string{filepath.Join(home, "Desktop")}
|
|
case "music":
|
|
return []string{filepath.Join(home, "Music")}
|
|
case "movies":
|
|
return []string{filepath.Join(home, "Movies")}
|
|
case "system":
|
|
return []string{
|
|
filepath.Join(home, "Library", "Caches"),
|
|
filepath.Join(home, "Library", "Logs"),
|
|
filepath.Join(home, "Library", "Developer", "Xcode", "DerivedData"),
|
|
}
|
|
default:
|
|
return []string{}
|
|
}
|
|
}
|