Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos
Referencia de la Clase AQZipWriter

#include <AQZipWriter.h>

Lista de todos los miembros.

Tipos públicos

enum  Status {
  NoError, FileWriteError, FileOpenError, FilePermissionsError,
  FileError
}
enum  CompressionPolicy { AlwaysCompress, NeverCompress, AutoCompress }

Métodos públicos

 AQZipWriter (const QString &fileName, uint mode=(IO_WriteOnly|IO_Truncate))
 AQZipWriter (QIODevice *device)
 ~AQZipWriter ()
QIODevicedevice () const
bool isWritable () const
bool exists () const
Status status () const
void setCompressionPolicy (CompressionPolicy policy)
CompressionPolicy compressionPolicy () const
void setCreationPermissions (QFileInfo::PermissionSpec permissions)
QFileInfo::PermissionSpec creationPermissions () const
void addFile (const QString &fileName, const QByteArray &data)
void addFile (const QString &fileName, QIODevice *device)
void addDirectory (const QString &dirName)
void addSymLink (const QString &fileName, const QString &destination)
void close ()

Documentación de las enumeraciones miembro de la clase

AlwaysCompress A file that is added is compressed. NeverCompress A file that is added will be stored without changes. AutoCompress A file that is added will be compressed only if that will give a smaller file.

Valores de enumeraciones:
AlwaysCompress 
NeverCompress 
AutoCompress 

The following status values are possible:

NoError No error occurred. FileWriteError An error occurred when writing to the device. FileOpenError The file could not be opened. FilePermissionsError The file could not be accessed. FileError Another file error occurred.

Valores de enumeraciones:
NoError 
FileWriteError 
FileOpenError 
FilePermissionsError 
FileError 

Documentación del constructor y destructor

AQZipWriter::AQZipWriter ( const QString fileName,
uint  mode = (IO_WriteOnly | IO_Truncate) 
)

Create a new zip archive that operates on the archive filename. The file will be opened with the mode.

Ver también:
isValid()
AQZipWriter::AQZipWriter ( QIODevice device) [explicit]

Create a new zip archive that operates on the archive found in device. You have to open the device previous to calling the constructor and only a device that is readable will be scanned for zip filecontent.

AQZipWriter::~AQZipWriter ( )

Documentación de las funciones miembro

void AQZipWriter::addDirectory ( const QString dirName)

Create a new directory in the archive with the specified dirName and the permissions;

void AQZipWriter::addFile ( const QString fileName,
const QByteArray data 
)

Add a file to the archive with data as the file contents. The file will be stored in the archive using the fileName which includes the full path in the archive.

The new file will get the file permissions based on the current creationPermissions and it will be compressed using the zip compression based on the current compression policy.

Ver también:
setCreationPermissions()
setCompressionPolicy()
void AQZipWriter::addFile ( const QString fileName,
QIODevice device 
)

Add a file to the archive with device as the source of the contents. The contents returned from QIODevice::readAll() will be used as the filedata. The file will be stored in the archive using the fileName which includes the full path in the archive.

void AQZipWriter::addSymLink ( const QString fileName,
const QString destination 
)

Create a new symbolic link in the archive with the specified dirName and the permissions; A symbolic link contains the destination (relative) path and name.

void AQZipWriter::close ( void  )

Closes the zip file.

AQZipWriter::CompressionPolicy AQZipWriter::compressionPolicy ( ) const

Returns the currently set compression policy.

Ver también:
setCompressionPolicy()
addFile()
QFileInfo::PermissionSpec AQZipWriter::creationPermissions ( ) const

Returns the currently set creation permissions.

Ver también:
setCreationPermissions()
addFile()
QIODevice * AQZipWriter::device ( ) const

Returns device used for writing zip archive.

bool AQZipWriter::exists ( ) const

Returns true if the file exists; otherwise returns false.

bool AQZipWriter::isWritable ( ) const

Returns true if the user can write to the archive; otherwise returns false.

void AQZipWriter::setCompressionPolicy ( CompressionPolicy  policy)

Sets the policy for compressing newly added files to the new policy.

Nota:
the default policy is AlwaysCompress
Ver también:
compressionPolicy()
addFile()
void AQZipWriter::setCreationPermissions ( QFileInfo::PermissionSpec  permissions)

Sets the permissions that will be used for newly added files.

Nota:
the default permissions are QFile::ReadOwner | QFile::WriteOwner.
Ver también:
creationPermissions()
addFile()
AQZipWriter::Status AQZipWriter::status ( void  ) const

Returns a status code indicating the first error that was met by AQZipWriter, or AQZipWriter::NoError if no error occurred.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'