eUnsupported:
return "eUnsupported";
85 caseeMemory:
return "eMemory";
86 caseeUnsupportedEntryType:
return "eUnsupportedEntryType";
87 caseeBadName:
return "eBadName";
88 caseeCreate:
return "eCreate";
89 caseeOpen:
return "eOpen";
90 caseeClose:
return "eClose";
91 caseeList:
return "eList";
92 caseeExtract:
return "eExtract";
93 caseeAppend:
return "eAppend";
94 caseeWrite:
return "eWrite";
95 caseeBackup:
return "eBackup";
96 caseeRestoreAttrs:
return "eRestoreAttrs";
125memset(&m_Stat, 0,
sizeof(m_Stat));
128m_CompressedSize = 0;
136 const string&
GetName(
void)
const{
returnm_Name; }
140 const string&
GetComment(
void)
const{
returnm_Comment; }
146 mode_tGetMode(
void)
const;
151 unsigned intGetMajor(
void)
const;
152 unsigned intGetMinor(
void)
const;
153 unsigned int GetUserId(
void)
const{
returnm_Stat.st_uid; }
154 unsigned int GetGroupId(
void)
const{
returnm_Stat.st_gid; }
260 virtual void OpenFile(
const string& filename) = 0;
350 const string& dst_path) = 0;
365 void*
buf,
size_t size) = 0;
377Callback_Write callback) = 0;
401 const string& src_path,
ELevellevel) = 0;
CArchiveZip â implementation of IArchive interface for ZIP-archives.
CArchive - base class for file- or memory-based archives.
IArchive â abstract interface class for archive formats.
bool operator==(const CEquivRange &A, const CEquivRange &B)
CDirEntry::EType GetType(void) const
string m_GroupName
Group name.
const string & GetUserName(void) const
CDirEntry::EType EType
Archive entry type (the same as directory entry type).
ELocation m_Location
Archive location (file/memory)
virtual void Close(void)=0
Close the archive.
size_t m_Index
Entry index in the archive.
virtual void ExtractEntryToFileSystem(const CArchiveEntryInfo &info, const string &dst_path)=0
Extracts an archive entry to file system.
const string & GetGroupName(void) const
virtual void TestEntry(const CArchiveEntryInfo &info)=0
Verify entry integrity.
ELevel
Compression level.
size_t GetIndex(void) const
string m_Comment
Entry comment.
const string & GetComment(void) const
CDirEntry::EType m_Type
Type.
virtual void OpenFileStream(FILE *filestream, Uint8 archive_size=0)=0
Open archive from a FILE stream, beginning at the current file position.
ELocation
Archive location.
virtual void AddEntryFromFileSystem(const CArchiveEntryInfo &info, const string &src_path, ELevel level)=0
Add single entry to newly created archive from file system.
virtual const char * GetErrCodeString(void) const override
Translate from an error code value to its string representation.
NCBI_EXCEPTION_DEFAULT(CArchiveException, CCoreException)
const string & GetLinkName(void) const
virtual bool HaveSupport_FileStream(void)=0
virtual void GetEntryInfo(size_t index, CArchiveEntryInfo *info)=0
Get detailed information about an archive entry by index.
string m_LinkName
Link name if type is eLink.
Uint8 GetSize(void) const
virtual void ExtractEntryToCallback(const CArchiveEntryInfo &info, Callback_Write callback)=0
Extracts an archive file using user-defined callback to process extracted data.
TNcbiSys_stat m_Stat
Direntry-compatible info (as applicable)
time_t GetCreationTime(void) const
const string & GetName(void) const
virtual void SkipEntry(const CArchiveEntryInfo &info)=0
Don't need to be implemented for ZIP format.
string m_Name
Entry name.
EDirection m_Mode
Processing direction (read/write)
CCompression::ELevel ELevel
virtual void CreateMemory(size_t initial_allocation_size=0)=0
Create new archive located in memory.
unsigned int GetGroupId(void) const
unsigned int GetUserId(void) const
ostream & operator<<(ostream &, const CArchiveEntryInfo &)
Nice TOC (table of contents) printout.
EDirection
Processing direction.
time_t GetLastAccessTime(void) const
virtual void CreateFile(const string &filename)=0
Create new archive file.
virtual size_t GetNumEntries(void)=0
Returns the total number of entries in the archive.
string m_UserName
User name.
virtual void OpenMemory(const void *buf, size_t size)=0
Open archive located in memory for reading.
virtual void AddEntryFromMemory(const CArchiveEntryInfo &info, void *buf, size_t size, ELevel level)=0
Add entry to newly created archive from memory buffer.
Uint8 m_CompressedSize
Compressed size.
virtual void OpenFile(const string &filename)=0
Open archive file for reading.
time_t GetModificationTime(void) const
virtual void FinalizeMemory(void **buf, size_t *size)=0
Finalize the archive created in memory.
virtual bool HaveSupport_Type(CDirEntry::EType type)=0
Check that current archive format have support for specific feature.
virtual void ExtractEntryToMemory(const CArchiveEntryInfo &info, void *buf, size_t size)=0
Extracts an archive file to a memory buffer.
virtual void CreateFileStream(FILE *filestream)=0
Create new archive file on top of a FILE stream.
virtual bool HaveSupport_AbsolutePath(void)=0
@ eFileStream
File stream based archive (FILE*)
@ eFile
File-based archive.
@ eRead
Reading from archive.
EErrCode
Error types that an application can generate.
TErrCode GetErrCode(void) const
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
EType
Directory entry type.
unsigned int TSpecialModeBits
Bitwise OR of ESpecialModeBits.
unsigned int TMode
Bitwise OR of "EMode".
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
struct _stat64 TNcbiSys_stat
NCBI_XUTIL_EXPORT
Parameter to control printing diagnostic message about conversion of static array data from a differe...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4