/// <summary>
        /// Extract to specific file
        /// </summary>
        public static void WriteToFile(this RarArchiveEntry entry, string destinationFileName, CancellationToken cancellation,
                                       IRarExtractionListener listener,
                                       ExtractOptions options = ExtractOptions.Overwrite)
        {
            FileMode fm = FileMode.Create;

            if (!options.HasFlag(ExtractOptions.Overwrite))
            {
                fm = FileMode.CreateNew;
            }
            using (FileStream fs = File.Open(destinationFileName, fm))
            {
                entry.WriteTo(fs, cancellation, listener);
            }
        }
 public static void WriteTo(this RarArchiveEntry entry, Stream stream, CancellationToken cancellation)
 {
     entry.WriteTo(stream, cancellation, new NullRarExtractionListener());
 }