Show / Hide Table of Contents

    Class ZipWrapper

    This is a class to allow access to resources within an archive. It is a sibling to FolderWrapper that can access resources within a folder

    Inheritance
    Object
    ZipWrapper
    Implements
    IFolderWrapper
    IDisposable
    Namespace: RCM
    Assembly: Anki.Resources.SDK.dll
    Syntax
    public class ZipWrapper : IFolderWrapper, IDisposable

    Constructors

    ZipWrapper(String)

    Creates an object that can access resources within an archive

    Declaration
    public ZipWrapper(string path)
    Parameters
    Type Name Description
    String path

    The path to the archive file

    Methods

    Dispose()

    Dispose of any internal resources

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Dispose of the archive

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    true, right?

    Exists(String)

    Determines whether the specified file exists.

    Declaration
    public bool Exists(string relativePath)
    Parameters
    Type Name Description
    String relativePath

    The name of file within the wrapper

    Returns
    Type Description
    Boolean

    true if the file exists within the wrapper, false otherwise

    Retain()

    Increment the reference count for this object. Decrement the count using Dispose().

    Declaration
    public void Retain()

    Stream(String)

    This creates a stream for the given resources within the container

    Declaration
    public Stream Stream(string relativePath)
    Parameters
    Type Name Description
    String relativePath

    The name of file within the container

    Returns
    Type Description
    Stream

    null on error, otherwise a stream that can be used to access the file data

    Implements

    IFolderWrapper
    System.IDisposable
    Back to top Copyright (c) 2020 by Randall Maas