ArchiveWriter Class
Properties Methods Events Configuration Settings Errors
The ArchiveWriter class allows compressing, updating and modifying files for zip, tar, gzip and bzip2 archives.
Syntax
SecureBlackboxLiteArchiveWriter
SecureBlackboxLiteArchiveWriterSwift
Remarks
Use ArchiveWriter to compress, update, and modify files in archives.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
- archiveType | The type of the archive. |
- compressionLevel | The compression level to apply to the archived data. |
- decryptionCertCount | The number of records in the DecryptionCert arrays. |
- decryptionCertBytes:(int)decryptionCertIndex | Returns raw certificate data in DER format. |
- decryptionCertHandle:(int)decryptionCertIndex | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
- decryptionPassword | The decryption password. |
- encryptionAlgorithm | Specifies the encryption algorithm to apply to the archive. |
- encryptionCertBytes | Returns raw certificate data in DER format. |
- encryptionCertHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
- encryptionPassword | Specifies the archive encryption password. |
- encryptionType | The type of encryption to apply to the archive. |
- fileData | The contents of the file being added to the archive. |
- fileCount | The number of records in the File arrays. |
- fileAction:(int)fileIndex | The action to apply to the file. |
- fileCompressedSize:(int)fileIndex | The size of the file after compression. |
- fileDataSource:(int)fileIndex | The type of the data source for this entry. |
- fileDirectory:(int)fileIndex | Tells if the entry is a directory or a regular file. |
- fileEncryptionAlgorithm:(int)fileIndex | Returns the symmetric algorithm that was used to encrypt the file. |
- fileEncryptionKeyLength:(int)fileIndex | Returns the length, in bits, of the encryption key. |
- fileEncryptionType:(int)fileIndex | The type of encryption applied to the file. |
- fileFileName:(int)fileIndex | The original name of the compressed file or folder. |
- fileFolder:(int)fileIndex | The containing folder of the entry. |
- fileLocalPath:(int)fileIndex | The local path associated with this entry. |
- fileMTime:(int)fileIndex | The entry's last modification time. |
- fileNewFile:(int)fileIndex | Indicates whether the entry corresponds to a file to be added to the archive. |
- filePath:(int)fileIndex | The full internal path of the archived entry. |
- fileSignatureCount:(int)fileIndex | The number of signatures covering the entry. |
- fileSigned:(int)fileIndex | Indicates whether the entry is signed. |
- fileSize:(int)fileIndex | The size of the file before compression. |
- newArchive | Indicates whether the archive object represents a new (rather than opened) archive. |
- opened | Indicates whether class is currently in edit mode. |
- signingCertBytes | Returns raw certificate data in DER format. |
- signingCertHandle | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
- signingChainCount | The number of records in the SigningChain arrays. |
- signingChainBytes:(int)signingChainIndex | Returns raw certificate data in DER format. |
- signingChainHandle:(int)signingChainIndex | Allows to get or set a 'handle', a unique identifier of the underlying property object. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
- addEmptyDir | Adds an empty folder to the archive. |
- addFile | Adds a file to the archive. |
- addFiles | Adds a group of files to the archive. |
- addVirtual | Adds a file placeholder to the archive. |
- close | Closes the archive. |
- config | Sets or retrieves a configuration setting. |
- createNew | Creates a new archive. |
- open | Opens an archive file. |
- openBytes | Loads an archive file from a byte array. |
- remove | Removes file(s) and/or folder(s) from the archive. |
- save | Compresses the archive and saves it to a file. |
- saveBytes | Compresses the archive and saves it to a byte array. |
- updateFile | Updates an existing compressed entry with a fresher local version. |
- updateFiles | Updates a selection of files in the archive. |
- updateVirtual | Updates an entry in the archive with on-the-fly content. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
- onAfterCompressFile | Marks the completion of compression of a file. |
- onBeforeCompressFile | Marks the start of compression of a file. |
- onDecryptionPasswordNeeded | Fires when the class needs a password to decrypt the archive. |
- onError | Reports information about errors during archive assembling. |
- onNotification | This event notifies the application about an underlying control flow event. |
- onPrepareFile | Fires for every file to be compressed before the compression starts. |
- onProgress | Reports the progress of data compression. |
- onRecipientFound | Signifies that the archive was found to be encrypted with a digital certificate. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
EncryptionKeyLength | The length of the encryption key. |
TempPath | Path for storing temporary files. |
UsePax | Enables use of PAX algorithm when creating TAR directories. |
UseUStar | Enables use of UStar variant of file name packaging when creating TAR directories. |