SharArchive
Contents
[
Hide
]SharArchive constructor (1 of 2)
Initializes a new instance of the SharArchive
class.
public SharArchive()
Examples
The following example shows how to compress a file.
using (var archive = new SharArchive())
{
archive.CreateEntry("first.bin", "data.bin");
archive.Save("archive.shar");
}
See Also
- class SharArchive
- namespace Aspose.Zip.Shar
- assembly Aspose.Zip
SharArchive constructor (2 of 2)
Initializes a new instance of the SharArchive
class prepared for decompressing.
public SharArchive(string path)
Parameter | Type | Description |
---|---|---|
path | String | Path to the source of the archive. |
Exceptions
exception | condition |
---|---|
ArgumentNullException | path is null. |
SecurityException | The caller does not have the required permission to access. |
ArgumentException | The path is empty, contains only white spaces, or contains invalid characters. |
UnauthorizedAccessException | Access to file path is denied. |
PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. |
NotSupportedException | File at path contains a colon (:) in the middle of the string. |
FileNotFoundException | The file is not found. |
DirectoryNotFoundException | The specified path is invalid, such as being on an unmapped drive. |
IOException | The file is already open. |
See Also
- class SharArchive
- namespace Aspose.Zip.Shar
- assembly Aspose.Zip