Files
kandev/apps/backend/internal/task/service/directory_roots.go
T
2026-07-23 14:45:49 +01:00

14 lines
320 B
Go

package service
func driveRootsFromMask(mask uint32) []DirectoryEntry {
roots := make([]DirectoryEntry, 0, 26)
for drive := 0; drive < 26; drive++ {
if mask&(1<<drive) == 0 {
continue
}
root := string(rune('A'+drive)) + `:\`
roots = append(roots, DirectoryEntry{Name: root, Path: root})
}
return roots
}