KDECore
#include "kzip.h"
#include "kfilterdev.h"
#include "klimitediodevice_p.h"
#include <kdebug.h>
#include <QtCore/QHash>
#include <QtCore/QByteArray>
#include <QtCore/QFile>
#include <QtCore/QDir>
#include <QtCore/QDate>
#include <QtCore/QList>
#include <zlib.h>
#include <time.h>
#include <string.h>
Go to the source code of this file.
|
static bool | handlePossibleHeaderBegin (const char *buffer, QIODevice *dev) |
|
static bool | parseExtraField (const char *buffer, int size, bool islocal, ParseFileInfo &pfi) |
|
static bool | parseExtTimestamp (const char *buffer, int size, bool islocal, ParseFileInfo &pfi) |
|
static bool | parseInfoZipUnixOld (const char *buffer, int size, bool islocal, ParseFileInfo &pfi) |
|
static bool | seekToNextHeaderToken (QIODevice *dev) |
|
static time_t | transformFromMsDos (const char *buffer) |
|
static void | transformToMsDos (const QDateTime &dt, char *buffer) |
|
static bool handlePossibleHeaderBegin |
( |
const char * |
buffer, |
|
|
QIODevice * |
dev |
|
) |
| |
|
static |
Checks if a token for a central or local header has been found and resets the device to the begin of the token.
If a token for the data descriptor is found it is assumed there is a central or local header token starting right behind the data descriptor, and the device is set accordingly to the begin of that token. To be called when a 'P' has been found.
- Parameters
-
buffer | start of buffer with the 3 bytes behind 'P' |
dev | device that is read from |
- Returns
- true if a local or central header begin is or could be reached
Definition at line 295 of file kzip.cpp.
static bool parseExtraField |
( |
const char * |
buffer, |
|
|
int |
size, |
|
|
bool |
islocal, |
|
|
ParseFileInfo & |
pfi |
|
) |
| |
|
static |
parses the extra field
- Parameters
-
buffer | start of buffer where the extra field is to be found |
size | size of the extra field |
islocal | true if this is part of a local header, false if of central |
pfi | ParseFileInfo object which to write the results into |
- Returns
- true if parsing was successful
Definition at line 243 of file kzip.cpp.
static bool parseExtTimestamp |
( |
const char * |
buffer, |
|
|
int |
size, |
|
|
bool |
islocal, |
|
|
ParseFileInfo & |
pfi |
|
) |
| |
|
static |
updates the parse information with the given extended timestamp extra field.
- Parameters
-
buffer | start content of buffer known to contain an extended timestamp extra field (without magic & size) |
size | size of field content (must not count magic and size entries) |
islocal | true if this is a local field, false if central |
pfi | ParseFileInfo object to be updated |
- Returns
- true if processing was successful
Definition at line 119 of file kzip.cpp.
static bool parseInfoZipUnixOld |
( |
const char * |
buffer, |
|
|
int |
size, |
|
|
bool |
islocal, |
|
|
ParseFileInfo & |
pfi |
|
) |
| |
|
static |
updates the parse information with the given Info-ZIP Unix old extra field.
- Parameters
-
buffer | start of content of buffer known to contain an Info-ZIP Unix old extra field (without magic & size) |
size | size of field content (must not count magic and size entries) |
islocal | true if this is a local field, false if central |
pfi | ParseFileInfo object to be updated |
- Returns
- true if processing was successful
Definition at line 179 of file kzip.cpp.
Reads the device forwards from the current pos until a token for a central or local header has been found or is to be assumed.
- Parameters
-
dev | device that is read from |
- Returns
- true if a local or central header token could be reached, false on error
Definition at line 329 of file kzip.cpp.
static time_t transformFromMsDos |
( |
const char * |
buffer | ) |
|
|
static |
static void transformToMsDos |
( |
const QDateTime & |
dt, |
|
|
char * |
buffer |
|
) |
| |
|
static |
const int max_path_len = 4095 |
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:12 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.