示例#1
0
        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);
        }
示例#2
0
        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);
        }