/// <summary> /// Extracts the file, optionally overwriting any existing file. /// </summary> /// <param name="destFileName">The destination path where the file will be extracted.</param> /// <param name="overwrite">If true, <paramref name="destFileName"/> will be overwritten if it exists.</param> /// <exception cref="IOException"><paramref name="overwrite"/> is false and <paramref name="destFileName"/> exists.</exception> public void CopyTo(string destFileName, bool overwrite) { if (destFileName == null) { throw new ArgumentNullException("destFileName"); } if (!overwrite && File.Exists(destFileName)) { throw new IOException("File already exists; not overwriting."); } Cabinet.ExtractFile(System.IO.Path.Combine(this.Path, this.Name), destFileName); }