Ejemplo n.º 1
0
        public List <string> GetFiles(string path, string extension)
        {
            var cleanedExtension = CleanExtension(extension);

            if (string.IsNullOrEmpty(cleanedExtension))
            {
                return(null);
            }

            DriveInformation = DriveInfo.GetDrives()
                               .FirstOrDefault(d => d.Name == path);

            if (DriveInformation == null)
            {
                return(null);
            }

            IsGettingFiles = true;

            var printScanInfo = Task.Run(() => PrintScanInfo());
            var files         = DiskReader.GetFiles(path, cleanedExtension);

            IsGettingFiles = false;
            printScanInfo.Wait();

            return(files);
        }
Ejemplo n.º 2
0
 public List <string> GetDrives()
 {
     return(DiskReader.GetDrives());
 }