Esempio n. 1
0
 internal FATX_Browser.FATX.IOWriter GetWriterIO()
 {
     if (DriveType == Info.DriveType.HDD)
     {
         try
         {
             io.Close();
         }
         catch { }
         try
         {
             br.Close();
         }
         catch { }
         try
         {
             bw.Close();
         }
         catch { }
         io = new IO.HDDFATX(false, null);
         bw = io.bw_diskWriter(DeviceID);
     }
     else if (DriveType == Info.DriveType.Backup)
     {
         try
         {
             io.Close();
         }
         catch{}
         try
         {
             br.Close();
         }
         catch{}
         try
         {
             bw.Close();
         }
         catch { }
         io = new IO.HDDFATX(true, DumpPath);
         bw = io.bw_dumpWriter();
     }
     else if (DriveType == Info.DriveType.USB)
     {
         try
         {
             io.Close();
         }
         catch { }
         try
         {
             br.Close();
         }
         catch { }
         try
         {
             bw.Close();
         }
         catch { }
         System.IO.FileInfo[] fi = new System.IO.DirectoryInfo(DumpPath).GetFiles();
         string[] FilePaths = new string[fi.Length];
         for (int i = 0; i < FilePaths.Length; i++)
         {
             FilePaths[i] = fi[i].FullName;
         }
         bw = new IOWriter(FilePaths);
     }
     return bw;
 }