[PR #349] [CLOSED] Extension method WriteAll(this IWriter, DirectoryInfo, string, SearchOption, bool) #981

Closed
opened 2026-01-29 22:18:27 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/349
Author: @SimonCahill
Created: 2/1/2018
Status: Closed

Base: masterHead: master


📝 Commits (3)

  • c211f23 Merge pull request #1 from adamhathcock/master
  • c094322 Merge branch 'master' into master
  • adaa44d Added new extension method

📊 Changes

2 files changed (+31 additions, -2 deletions)

View changed files

📝 src/SharpCompress/Common/OptionsBase.cs (+1 -0)
📝 src/SharpCompress/Writers/IWriterExtensions.cs (+30 -2)

📄 Description

Extension method WriteAll (see title) with option to prepend directory name.

This extension method allows Sharpcompress to behave similar to the tar executable.

Only available with > net3.5.

Usage:

To prepend the directory name to the paths within the archive:

    tar.WriteAll(archive, option: SearchOption.AllDirectories, prependDirectoryName: true);

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/349 **Author:** [@SimonCahill](https://github.com/SimonCahill) **Created:** 2/1/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`c211f23`](https://github.com/adamhathcock/sharpcompress/commit/c211f23983ab1a535f645479253dc132df5b674d) Merge pull request #1 from adamhathcock/master - [`c094322`](https://github.com/adamhathcock/sharpcompress/commit/c09432278ceb68bbdb2960b03df78b6b7e235a26) Merge branch 'master' into master - [`adaa44d`](https://github.com/adamhathcock/sharpcompress/commit/adaa44d9eceb8221c706fc1433231a3827ba8fe5) Added new extension method ### 📊 Changes **2 files changed** (+31 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/Common/OptionsBase.cs` (+1 -0) 📝 `src/SharpCompress/Writers/IWriterExtensions.cs` (+30 -2) </details> ### 📄 Description ### Extension method WriteAll (see title) with option to prepend directory name. This extension method allows Sharpcompress to behave similar to the tar executable. Only available with > net3.5. ### Usage: To prepend the directory name to the paths within the archive: ```csharp tar.WriteAll(archive, option: SearchOption.AllDirectories, prependDirectoryName: true); ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:18:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#981