This commit is contained in:
429Enjoyer committed 2026-05-13 08:49:42 +07:00
1 parent 84b067ebd4
commit e67d09a248
47 files changed
+3688 -958

No files matched your search

+19
View File
@@ -61,6 +61,25 @@ func CheckFolderExists(basePath, username string) bool {
return info.IsDir()
}
func CheckFoldersExist(basePath string, usernames []string) map[string]bool {
results := make(map[string]bool, len(usernames))
if basePath == "" {
return results
}
checked := make(map[string]bool, len(usernames))
for _, username := range usernames {
if _, alreadyChecked := checked[username]; alreadyChecked {
continue
}
exists := CheckFolderExists(basePath, username)
checked[username] = exists
results[username] = exists
}
return results
}
func CheckGifsFolderExists(basePath, username string) bool {
gifsPath := filepath.Join(basePath, username, "gifs")
info, err := os.Stat(gifsPath)