Chromium Embedded Framework (CEF)
117.1.0+ga287baf+chromium-117.0.5938.62
|
Thread-safe class for accessing zip archive file contents. More...
#include "include/wrapper/cef_zip_archive.h"
Classes | |
class | File |
Class representing a file in the archive. More... | |
Public Types | |
using | FileMap = std::map< CefString, CefRefPtr< File > > |
Public Member Functions | |
CefZipArchive () | |
Create a new object. More... | |
CefZipArchive (const CefZipArchive &)=delete | |
CefZipArchive & | operator= (const CefZipArchive &)=delete |
size_t | Load (CefRefPtr< CefStreamReader > stream, const CefString &password, bool overwriteExisting) |
Load the contents of the specified zip archive stream into this object. More... | |
void | Clear () |
Clears the contents of this object. More... | |
size_t | GetFileCount () const |
Returns the number of files in the archive. More... | |
bool | HasFile (const CefString &fileName) const |
Returns true if the specified file exists and has contents. More... | |
CefRefPtr< File > | GetFile (const CefString &fileName) const |
Returns the specified file. More... | |
bool | RemoveFile (const CefString &fileName) |
Removes the specified file. More... | |
size_t | GetFiles (FileMap &map) const |
Returns the map of all files. More... | |
![]() | |
RefCountedThreadSafe () | |
RefCountedThreadSafe (const RefCountedThreadSafe &)=delete | |
RefCountedThreadSafe & | operator= (const RefCountedThreadSafe &)=delete |
void | AddRef () const |
void | Release () const |
Friends | |
class | base::RefCountedThreadSafe< CefZipArchive > |
Additional Inherited Members | |
![]() | |
static constexpr cef_subtle::StartRefCountFromZeroTag | kRefCountPreference |
![]() | |
~RefCountedThreadSafe ()=default | |
Thread-safe class for accessing zip archive file contents.
This class should not be used with large archive files because all data will be resident in memory at the same time. This implementation supports a restricted set of zip archive features:
using CefZipArchive::FileMap = std::map<CefString, CefRefPtr<File> > |
CefZipArchive::CefZipArchive | ( | ) |
Create a new object.
|
delete |
void CefZipArchive::Clear | ( | ) |
Clears the contents of this object.
Returns the specified file.
size_t CefZipArchive::GetFileCount | ( | ) | const |
Returns the number of files in the archive.
size_t CefZipArchive::GetFiles | ( | FileMap & | map | ) | const |
Returns the map of all files.
bool CefZipArchive::HasFile | ( | const CefString & | fileName | ) | const |
Returns true if the specified file exists and has contents.
size_t CefZipArchive::Load | ( | CefRefPtr< CefStreamReader > | stream, |
const CefString & | password, | ||
bool | overwriteExisting | ||
) |
Load the contents of the specified zip archive stream into this object.
If the zip archive requires a password then provide it via |password|. If |overwriteExisting| is true then any files in this object that also exist in the specified archive will be replaced with the new files. Returns the number of files successfully loaded.
|
delete |
bool CefZipArchive::RemoveFile | ( | const CefString & | fileName | ) |
Removes the specified file.
|
friend |