C++ Utilities 5.32.1
Useful C++ classes and routines such as argument parser, IO and conversion utilities
Loading...
Searching...
No Matches
CppUtilities::ArchiveFile Struct Reference

The ArchiveFile class holds data about a file within an archive. More...

#include <archive.h>

Collaboration diagram for CppUtilities::ArchiveFile:
[legend]

Public Member Functions

 ArchiveFile (std::string &&name, std::string &&content, ArchiveFileType type, CppUtilities::DateTime creationTime, CppUtilities::DateTime modificationTime)

Public Attributes

std::string name
std::string content
CppUtilities::DateTime creationTime
CppUtilities::DateTime modificationTime
ArchiveFileType type

Detailed Description

The ArchiveFile class holds data about a file within an archive.

Remarks
The timezone of the timestamps is unfortunately unspecified at this point because libarchive does not provide timezone information (as functions like archive_entry_mtime are ambiguous about the timezone, see https://github.com/libarchive/libarchive/issues/945). Note that for Zip files the local timezone seems to be incorporated by libarchive (at least with version 3.8.4). So one can get the UTC time via e.g. DateTime::fromTimeStamp(modificationTime.toTimeStamp()). There is no guarantee that future versions of libarchive behave the same way.

Definition at line 60 of file archive.h.

Constructor & Destructor Documentation

◆ ArchiveFile()

CppUtilities::ArchiveFile::ArchiveFile ( std::string && name,
std::string && content,
ArchiveFileType type,
CppUtilities::DateTime creationTime,
CppUtilities::DateTime modificationTime )
inlineexplicit

Definition at line 61 of file archive.h.

Member Data Documentation

◆ content

std::string CppUtilities::ArchiveFile::content

Definition at line 71 of file archive.h.

◆ creationTime

CppUtilities::DateTime CppUtilities::ArchiveFile::creationTime

Definition at line 72 of file archive.h.

◆ modificationTime

CppUtilities::DateTime CppUtilities::ArchiveFile::modificationTime

Definition at line 73 of file archive.h.

◆ name

std::string CppUtilities::ArchiveFile::name

Definition at line 70 of file archive.h.

◆ type

ArchiveFileType CppUtilities::ArchiveFile::type

Definition at line 74 of file archive.h.


The documentation for this struct was generated from the following file: