ArchiveFactory.GetArchive
Contents
[
Hide
]GetArchive(string)
Detects the archive format and creates the appropriate IArchive object according to the type of archive specified by the given path.
public static IArchive GetArchive(string path)
| Parameter | Type | Description |
|---|---|---|
| path | String | The path to the archive to be analyzed. |
Return Value
An IArchive object representing the archive.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | path is null. |
| DirectoryNotFoundException | The specified path is invalid, (for example, it is on an unmapped drive). |
| FileNotFoundException | The file specified in path was not found. |
| IOException | An I/O error occurred while opening the file. |
| PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. |
| UnauthorizedAccessException | path specified a directory. -or- The caller does not have the required permission. |
See Also
- interface IArchive
- class ArchiveFactory
- namespace Aspose.Zip
- assembly Aspose.Zip
GetArchive(Stream)
Detects the archive format and creates the appropriate IArchive object according to the type of archive specified by the given stream.
public static IArchive GetArchive(Stream stream)
| Parameter | Type | Description |
|---|---|---|
| stream | Stream | The stream containing the archive data. It must be seekable. |
Return Value
An IArchive object representing the archive.
Exceptions
| exception | condition |
|---|---|
| ArgumentException | stream is not seekable. |
| ArgumentNullException | stream is null. |
See Also
- interface IArchive
- class ArchiveFactory
- namespace Aspose.Zip
- assembly Aspose.Zip
GetArchive(Stream, string)
Detects the archive format and creates the appropriate IArchive object according to the type of encrypted archive specified by the given stream.
public static IArchive GetArchive(Stream stream, string password)
| Parameter | Type | Description |
|---|---|---|
| stream | Stream | The stream containing the archive data. It must be seekable. |
| password | String | Password to decrypt an encrypted archive. |
Return Value
An IArchive object representing the archive.
Exceptions
| exception | condition |
|---|---|
| ArgumentException | stream is not seekable. |
| ArgumentNullException | stream is null. |
See Also
- interface IArchive
- class ArchiveFactory
- namespace Aspose.Zip
- assembly Aspose.Zip