Appearance
AddFile Method
Definition
- Namespace:
JASE - Assembly:
JASE.Compression.dll
bool AddFile(string name, byte[] content)
csharp
bool AddFile(string name, byte[] content)Adds or replaces a file entry in the current tarball.
Parameters
| Name | Description |
|---|---|
content | The file contents as a byte array. A value is treated as an empty file when the tar is generated. |
name | The file name to use inside the tar archive. This is written into the tar header and should be a relative path (e.g. "folder/file.txt"). |
Returns
if the file name is non-empty and the entry is added to the tarball; otherwise .
Remarks
If a file with the same name already exists, it is overwritten with the new content.