Interface
IPlatformManager

Supplies platform abstractions (file system temp storage, path separators, encodings, and cryptography) allowing the ZIP library to operate uniformly across environments.

Definition

Namespace:Telerik.Windows.Zip

Assembly:Telerik.Windows.Zip.dll

Syntax:

cs-api-definition
public interface IPlatformManager

Properties

AltDirectorySeparatorChar

Gets the alternate directory separator character (e.g. '/') used when normalizing archive entry paths.

Declaration

cs-api-definition
string AltDirectorySeparatorChar { get; }

Property Value

string

DefaultEncoding

Gets the default text encoding used for entry metadata when Unicode flags or overrides are absent.

Declaration

cs-api-definition
Encoding DefaultEncoding { get; }

Property Value

Encoding

DirectorySeparatorChar

Gets the primary directory separator character (e.g. '\') used when constructing platform-specific temporary paths.

Declaration

cs-api-definition
string DirectorySeparatorChar { get; }

Property Value

string

Methods

CreateTemporaryStream()

Creates a temporary stream used for intermediate buffering of compressed or encrypted data.

Declaration

cs-api-definition
Stream CreateTemporaryStream()

Returns

Stream

Stream will be used for temporary operations.

DeleteTemporaryStream(Stream)

Disposes and removes a previously created temporary stream, releasing underlying resources.

Declaration

cs-api-definition
void DeleteTemporaryStream(Stream stream)

Parameters

stream

Stream

Stream to delete.

GetCryptoProvider(EncryptionSettingsBase)

Returns a crypto provider initialized with the specified encryption settings, ready to produce encryptor/decryptor transforms.

Declaration

cs-api-definition
ICryptoProvider GetCryptoProvider(EncryptionSettingsBase settings)

Parameters

settings

EncryptionSettingsBase

Encryption settings.

Returns

ICryptoProvider

Crypto provider.

Exceptions

NotSupportedException

Specified crypto algorithm is not supported.

GetCryptoStream(EncryptionSettingsBase, Stream, StreamOperationMode, ICryptoProvider, CompressionSettings)

Creates a crypto stream wrapping baseStream using the provided encryption and compression settings in the specified operation mode.

Declaration

cs-api-definition
Stream GetCryptoStream(EncryptionSettingsBase encryptionSettings, Stream baseStream, StreamOperationMode mode, ICryptoProvider cryptoProvider, CompressionSettings compressionSettings)

Parameters

encryptionSettings

EncryptionSettingsBase

Encryption settings.

baseStream

Stream

Stream.

mode

StreamOperationMode

Stream operation mode.

cryptoProvider

ICryptoProvider

Crypto provider.

compressionSettings

CompressionSettings

Compression settings.

Returns

Stream

Crypto stream.

Exceptions

NotSupportedException

Specified crypto algorithm is not supported.

IsEncodingSupported(Encoding)

Determines whether the provided text encoding is supported by the current platform implementation.

Declaration

cs-api-definition
bool IsEncodingSupported(Encoding encoding)

Parameters

encoding

Encoding

Returns

bool