public Task <bool> Run() { try { _file.MoveTo(_file.FullName + "-unpacked"); using (ZipInputStream zipStream = new ZipInputStream(new ProgressStream(_file.OpenRead(), this))) { zipStream.UnpackAll(_file.Directory); } return(Task.FromResult(true)); } catch (Exception) { return(Task.FromResult(false)); } }
public Task <bool> Run() { try { using (ZipInputStream zipStream = new ZipInputStream(new ProgressStream(_file.OpenRead(), this))) { zipStream.UnpackAll( _file.Directory.CreateSubdirectory(Path.GetFileNameWithoutExtension(_file.Name))); } return(Task.FromResult(true)); } catch (Exception e) { return(Task.FromResult(false)); } }