/**
  * @param $path
  * @param $name string - open|array - upload from tmp ($_FILE[file_name])
  * @throws Exception
  * @return ImportFile
  */
 public static function factory($path, $name)
 {
     if (is_array($name)) {
         $file = new ImportFile($path);
         $file->removeOldFiles();
         $file->upload($name);
     } else {
         if (empty($name)) {
             throw new Exception("File name epmty!");
         }
         $file = new ImportFile($path, $name);
         $file->check();
     }
     return $file;
 }