Crear un archivo zip en vb.net




















You must reference the System. FileSystem assembly to execute the code. Inicializa una nueva instancia de la clase ZipArchive a partir de la secuencia especificada. Initializes a new instance of the ZipArchive class from the specified stream. Inicializa una nueva instancia de la clase ZipArchive a partir de la secuencia especificada y con el modo especificado.

Initializes a new instance of the ZipArchive class from the specified stream and with the specified mode. Inicializa una nueva instancia de la clase ZipArchive en el flujo especificado para el modo especificado y, opcionalmente, deja el flujo abierto. Initializes a new instance of the ZipArchive class on the specified stream for the specified mode, and optionally leaves the stream open.

Initializes a new instance of the ZipArchive class on the specified stream for the specified mode, uses the specified encoding for entry names, and optionally leaves the stream open. Gets the collection of entries that are currently in the zip archive. Gets a value that describes the type of action the zip archive can perform on entries. Creates an empty entry that has the specified path and entry name in the zip archive.

Creates an empty entry that has the specified entry name and compression level in the zip archive. Libera los recursos utilizados por la instancia actual de la clase ZipArchive. Releases the resources used by the current instance of the ZipArchive class.

Called by the Dispose and Finalize methods to release the unmanaged resources used by the current instance of the ZipArchive class, and optionally finishes writing the archive and releases the managed resources. Determina si el objeto especificado es igual que el objeto actual.

Determines whether the specified object is equal to the current object. Recupera un contenedor para la entrada especificada en el archivo zip. Retrieves a wrapper for the specified entry in the zip archive.

Serves as the default hash function. Obtiene el Type de la instancia actual. Es posible que el equipo muestre nombres o ubicaciones diferentes para algunos de los elementos de la interfaz de usuario de Visual Studio en las siguientes instrucciones. En el panel Plantillas instaladas , expanda Visual Basic y haga clic en Windows. En la casilla Nombre , escriba FileExplorer para establecer el nombre del proyecto y, luego, haga clic en Aceptar. Agregue los controles de la siguiente tabla al formulario y establezca los valores correspondientes para sus propiedades.

Cree un controlador de eventos Click para browseButton haciendo doble clic en el control del formulario. La llamada FolderBrowserDialog1. Opens a zip archive for reading at the specified path. Ir al contenido principal. Este explorador ya no se admite. Contenido Salir del modo de enfoque. Compression Ensamblado: System.

Importante Para usar la ZipFile clase, debe agregar una referencia al System. Sugerencia Para usar la clase ZipFile , debe hacer referencia al ensamblado System. Extraer el contenido de un archivo zip en un directorio Extract the contents of a zip archive to a directory. Agregar nuevos archivos a un archivo zip existente Add new files to an existing zip archive. Para abrir un flujo en un archivo individual incluido en un archivo zip To open a stream to an individual file contained in a zip archive.

CreateFromDirectory String, String. ExtractToDirectory String, String. Open String, ZipArchiveMode.



0コメント

  • 1000 / 1000