Telerik.Windows.Zip.Extensions
Platform manager which can be used with full version of the .NET Framework.
Initializes a new instance of the DotNetPlatformManager class.
Gets a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.
Gets default encoding for this platform.
Gets a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.
Gets or sets type of the temporary stream. The default value is TemporaryStreamType.Memory.
Creates temporary stream.
Stream will be used for temporary operations.
Deletes temporary stream.
Stream to delete.
Gets crypto provider initialized using given encryption settings.
Encryption settings.
Crypto provider.
Specified crypto algorithm is not supported.
Gets crypto stream initialized using given encryption settings.
Encryption settings.
Stream.
Stream operation mode.
Crypto provider.
Compression settings.
Crypto stream.
Specified crypto algorithm is not supported.
Indicates whether specified encoding is supported for this platform.
Encoding.
true if encoding is allowed in the ZIP file.
Type of the temporary stream.
The temporary stream represents temporary file in the file system.
It allows manipulations with large archives and minimize memory consumption.
The temporary stream represents data in the memory.
It is the fastest way of the data manipulation.
Provides static methods for creating, extracting, and opening zip archives.
Archives a file by compressing it and adding it to the zip archive.
The zip archive to add the file to.
The path to the file to be archived. You can specify either a relative or an absolute path. A relative path is interpreted as relative to the current working directory.
The name of the entry to create in the zip archive.
The time period after which the operation will be cancelled.
New entry in archive.
Archives a file by compressing it using the specified compression level and adding it to the zip archive.
The zip archive to add the file to.
The path to the file to be archived. You can specify either a relative or an absolute path. A relative path is interpreted as relative to the current working directory.
The name of the entry to create in the zip archive.
One of the enumeration values that indicates whether to emphasize speed or compression effectiveness when creating the entry.
The time period after which the operation will be cancelled.
New entry in archive.
Archives a file by compressing it using the specified compression settings and adding it to the zip archive.
The zip archive to add the file to.
The path to the file to be archived. You can specify either a relative or an absolute path. A relative path is interpreted as relative to the current working directory.
The name of the entry to create in the zip archive.
Compression settings.
The time period after which the operation will be cancelled.
New entry in archive.
Creates a zip archive that contains the files and directories from the specified directory.
The path to the directory to be archived, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
The path of the archive to be created, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
The time period after which the operation will be cancelled.
Creates a zip archive that contains the files and directories from the specified directory, uses the specified compression level, and optionally includes the base directory.
The path to the directory to be archived, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
The path of the archive to be created, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
One of the enumeration values that indicates whether to emphasize speed or compression effectiveness when creating the entry.
True to include the directory name from sourceDirectoryName at the root of the archive; false to include only the contents of the directory.
The time period after which the operation will be cancelled.
Creates a zip archive that contains the files and directories from the specified directory, uses the specified compression level, and optionally includes the base directory.
The path to the directory to be archived, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
The path of the archive to be created, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
One of the enumeration values that indicates whether to emphasize speed or compression effectiveness when creating the entry.
True to include the directory name from sourceDirectoryName at the root of the archive; false to include only the contents of the directory.
The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names.
The time period after which the operation will be cancelled.
Creates a zip archive that contains the files and directories from the specified directory, uses the specified compression settings, and optionally includes the base directory.
The path to the directory to be archived, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
The path of the archive to be created, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
Compression settings.
True to include the directory name from sourceDirectoryName at the root of the archive; false to include only the contents of the directory.
The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names.
The time period after which the operation will be cancelled.
Creates a zip archive that contains the files and directories from the specified directory, uses the specified compression settings, and optionally includes the base directory.
The path to the directory to be archived, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
The path of the archive to be created, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
Compression settings.
True to include the directory name from sourceDirectoryName at the root of the archive; false to include only the contents of the directory.
The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names.
The cancellation token used to cancel the operation.
Extracts all the files in the specified zip archive to a directory on the file system.
The path to the archive that is to be extracted.
The path to the directory in which to place the extracted files,
specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
The time period after which the operation will be cancelled.
Extracts all the files in the specified zip archive to a directory on the file system and uses the specified character encoding for entry names.
The path to the archive that is to be extracted.
The path to the directory in which to place the extracted files,
specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
The encoding to use when reading or writing entry names in this archive.
Specify a value for this parameter only when an encoding is required for interoperability with zip archive
tools and libraries that do not support UTF-8 encoding for entry names.
The time period after which the operation will be cancelled.
Extracts all the files in the zip archive to a directory on the file system.
The zip archive to extract files from.
The path to the directory to place the extracted files in. You can specify either a relative or an absolute path. A relative path is interpreted as relative to the current working directory.
The time period after which the operation will be cancelled.
Extracts an entry in the zip archive to a file.
The zip archive entry to extract a file from.
The path of the file to create from the contents
of the entry. You can specify either a relative or an absolute path. A relative path
is interpreted as relative to the current working directory.
The time period after which the operation will be cancelled.
Extracts an entry in the zip archive to a file, and optionally overwrites an existing file that has the same name.
The zip archive entry to extract a file from.
The path of the file to create from the contents
of the entry. You can specify either a relative or an absolute path. A relative path
is interpreted as relative to the current working directory.
True to overwrite an existing file that has the same name as the destination file; otherwise, false.
The time period after which the operation will be cancelled.
Opens a zip archive at the specified path and in the specified mode.
The path to the archive to open, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
One of the enumeration values that specifies the actions which are allowed on the entries in the opened archive.
The opened zip archive.
Opens a zip archive at the specified path and in the specified mode.
The path to the archive to open, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
One of the enumeration values that specifies the actions which are allowed on the entries in the opened archive.
The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names.
The opened zip archive.
Opens a zip archive for reading at the specified path.
The path to the archive to open, specified as a relative or absolute path.
A relative path is interpreted as relative to the current working directory.
The opened zip archive.
Indicates whether specified directory is empty or not.
Directory info.
True if directory is empty; otherwise - false.
Resolves a path to a document applying extension, traversal and (Windows-only) UNC validations.
Base directory (relative or absolute).
User-supplied path (relative, absolute, or UNC).
UNC host/share allow-list (Windows only). Null or empty denies all UNC paths.
Full path if valid; otherwise null.
Returns the candidate resolved path (absolute or UNC) without performing an existence check.
Applies validation logic if enabled. Intended strictly for internal testing of resolution semantics.
Lightweight resolution when document path validation is disabled.
Combines base + relative if needed and returns the candidate path (existence checked centrally in ResolvePath).
Skips UNC allow-list and traversal containment checks.
Performs secure resolution of a document path:
1) Determines effective absolute path (respecting UNC vs local semantics).
2) If UNC, verifies host/share is explicitly allowed before any filesystem call.
3) Normalizes paths and enforces containment within base (or allowed UNC root).
4) Returns path only if the target file exists.
Produces an absolute candidate path unless already rooted. UNC paths are considered rooted.
Returns true for Windows UNC patterns (\\server, \\?\UNC\server). Non-Windows platforms return false.
Normalizes path for comparison: trims; on Windows converts '/' to '\\' and collapses redundant leading backslashes.
Assumes networkPath is already confirmed as a network/UNC path. Returns true if it begins with any canonical allow-list prefix.
Converts an allow-list entry to canonical form: \\host\\share\\ (ensures leading/trailing backslashes).
Returns the longest canonical allow-list prefix that matches the UNC path; null if no match.
Assumes entries in allowedNetworkHosts are already canonical ("\\\\host\\share\\").
Precomputes a distinct set of canonical UNC prefixes from a raw allow-list.
Returns an empty array if source is null or no valid entries.
Platform check for Windows.
Collapses '.' and '..' segments in a UNC path after the allowed root prefix.