public static List <GalleryDirectory> GetRootDirectories() { var roots = new List <GalleryDirectory>(); foreach (var drivePath in Directory.GetLogicalDrives()) { var drive = new GalleryDirectory(drivePath); roots.Add(drive); } return(roots); }
public List <GalleryDirectory> GetSubDirectories() { var subDirs = new List <GalleryDirectory>(); try { foreach (var subFolderPath in Directory.GetDirectories(FullPath)) { var subFolder = new GalleryDirectory(subFolderPath); subDirs.Add(subFolder); } } catch (Exception ex) { } return(subDirs); }