archive:didAddFile: |
This method is called immediately after the framework compressed a file into an archive.
- (void)archive:(MPQArchive *)archive didAddFile:(NSString *)file;
archive- The archive in which the file was added.
file- The MPQ path of the file that was added.
This message is sent regardless if the file was compressed or not, encrypted or not.
archive:didDeleteFile: |
This method is called immediately after the framework deleted a file from an archive.
- (void)archive:(MPQArchive *)archive didDeleteFile:(NSString *)file;
archive- The archive from which file was deleted.
file- The MPQ path of the file that was deleted.
Note that unlike file addition and renaming, archive:willDeleteFile: and archive:didDeleteFile: are not invoked when the archive is saved, but rather immediately before and after the delete file method is invoked respectively. This is because no extra operation is performed at save time for deletion, unlike addition and renaming. Note however that deletion is undoable until the archive is saved.
archive:didOpenFile: |
This method is called immediately after the framework opened a file from an archive.
- (void)archive:(MPQArchive *)archive didOpenFile:(NSString *)file;
archive- The archive from which file was deleted.
file- The MPQ path of the file that was deleted.
Will not be called if file opening is cancelled or failed.
archive:didRenameFile:as: |
This method is called immediately after the framework renamed a file of an archive.
- (void)archive:(MPQArchive *)archive didRenameFile:(NSString *)file
as:(NSString *)newFile;
archive- The archive in which the renamed file is stored.
file- The MPQ path of the file that was renamed.
newFile- The new MPQ path of the file that was renamed.
It is safe to use the new name as soon as this message is sent.
archive:shouldAddFile: |
This method is called immediately before adding a file to an archive.
- (BOOL)archive:(MPQArchive *)archive shouldAddFile:(NSString *)file;
archive- The archive in which the file will be added.
file- The MPQ path of the file that is about to be added.
This method is invoked when adding a file to the archive but prior to that file being actually compressed and written in the MPQ archive file. Return YES to permit the addition or NO to cancel it. Note that the new file will be accessible right after the addition method returns (if it was sucessfull). However, the data of the file will be read from the original file on disk until the archive is saved, at which time the delegate will be notified that the file is being compressed (if compression was specified) and added to the MPQ archive file.
archive:shouldDeleteFile: |
This method is called immediately before deleting a file from an archive.
- (BOOL)archive:(MPQArchive *)archive shouldDeleteFile:(NSString *)file;
archive- The archive in which file will be deleted.
file- The MPQ path of the file that is about to be deleted.
Return YES to permit the addition or NO to cancel it.
archive:shouldOpenFile: |
This method is called immediately before opening a file of the archive.
- (BOOL)archive:(MPQArchive *)archive shouldOpenFile:(NSString *)file;
archive- The archive containing the file that is about to be opened.
file- The MPQ path of the file that is about to be opened.
Return YES to permit the file to be opened or NO to prevent it.
archive:shouldRenameFile:as: |
This method is called immediately before renaming a file of an archive.
- (BOOL)archive:(MPQArchive *)archive shouldRenameFile:(NSString *)file
as:(NSString *)newFile;
archive- The archive in which the file to be renamed is stored.
file- The MPQ path of the file that is about to be renamed.
newFile- The new MPQ path of the file that is about to be renamed.
This method is invoked when renaming a file of the archive but prior to that file being actually re-encrypted and re-written in the MPQ archive file. Return YES to permit the rename or NO to cancel it. Note that the file will be accessible right after the rename method returns (if it was sucessfull) as the new name. The delegate will be notified that the file is being re-processed at save time.
archive:willAddFile: |
This method is called immediately before the framework starts compressing a file into an archive.
- (void)archive:(MPQArchive *)archive willAddFile:(NSString *)file;
archive- The archive in which the file will be added.
file- The MPQ path of the file that is about to be added.
This method is called for each file pending for addition in the archive being saved. This method is invoked after archiveWillSave: but prior to archiveDidSave:.
archive:willDeleteFile: |
This method is called immediately before the framework deletes a file from an archive.
- (void)archive:(MPQArchive *)archive willDeleteFile:(NSString *)file;
archive- The archive from which file will be deleted.
file- The MPQ path of the file that is about to be deleted.
This method is invoked after archive:shouldDeleteFile:. Note that unlike file addition and renaming, archive:willDeleteFile: and archive:didDeleteFile: are not invoked when the archive is saved, but rather immediately before and after the delete file method is invoked respectively. This is because no extra operation is performed at save time for deletion, unlike addition and renaming. Note however that deletion is undoable until the archive is saved.
archive:willOpenFile: |
This method is called immediately before opening a file of the archive.
- (void)archive:(MPQArchive *)archive willOpenFile:(NSString *)file;
archive- The archive containing the file that is about to be opened.
file- The MPQ path of the file that is about to be opened.
This method is invoked after archive:shouldOpenFile:.
archive:willRenameFile:as: |
This method is called immediately before the framework starts renaming a file of an archive.
- (void)archive:(MPQArchive *)archive willRenameFile:(NSString *)file
as:(NSString *)newFile;
archive- The archive in which the file to be renamed is stored.
file- The MPQ path of the file that is about to be renamed.
newFile- The new MPQ path of the file that is about to be renamed.
This method is called for each file pending for renaming in the archive being saved. This method is invoked after archiveWillSave: but prior to archiveDidSave:.
archiveDidSave: |
This method is called immediately after saving an archive.
- (void)archiveDidSave:(MPQArchive *)archive;
archive- The archive that did save.
archiveDidSave: will not be sent to the delegate if the save operation failed.
archiveShouldSave: |
This method is called immediately before saving an archive.
- (BOOL)archiveShouldSave:(MPQArchive *)archive;
archive- The archive that is about to be saved.
Return YES in this delegate to perform the save operation, or NO to cancel the save operation.
archiveWillSave: |
This method is called immediately before saving an archive but after archiveShouldSave: if it is implemented by the delegate.
- (void)archiveWillSave:(MPQArchive *)archive;
archive- The archive that is about to be saved.
This message is always sent if the delegate implements it.
(Last Updated April 02, 2007)