Class Unzip

#include <Geode/utils/file.hpp>
classUnzip{ ... }
No description provided
Examples0
Public static methods4
staticgeode::Result<geode::utils::file::Unzip>create()

Create unzipper for file

staticgeode::Result<geode::utils::file::Unzip>create()

Create unzipper for data in-memory

staticgeode::Result<>intoDir(,,
booldeleteZipAfter
)

Helper method for quickly unzipping a file

Parameters

from

ZIP file to unzip

to

Directory to unzip to

deleteZipAfter

Whether to delete the zip after unzipping
Return value
Succesful result on success, errorful result on error
staticgeode::Result<>intoDir(,,,
booldeleteZipAfter
)
No description provided
Public member functions7
voidsetProgressCallback()

Set a callback to be called with the progress of the unzip operation, first argument is the current entry, second argument is the total entries

Parameters

callback

Callback to call with the progress of the unzip operation

ℹ This is not thread-safe

geode::utils::file::Unzip::PathgetPath()const

Path to the opened zip

Return value
The path to the zip that is being read, or an empty path if the zip was opened in memory
std::vector<geode::utils::file::Unzip::Path>getEntries()const

Get all entries in zip

boolhasEntry()

Check if zip has entry

Parameters

name

Entry path in zip
geode::Result<geode::ByteVector>extract()

Extract entry to memory

Parameters

name

Entry path in zip
geode::Result<>extractTo(,)

Extract entry to file

Parameters

name

Entry path in zip

path

Target file path
geode::Result<>extractAllTo()

Extract all entries to directory

Parameters

dir

Directory to unzip the contents to
Fields0
Protected member functions0
Protected fields0