SecureBlackbox Lite 2020 iOS Edition

Questions / Feedback?

onPrepareFile (event)

Fires for every file to be compressed before the compression starts.

Syntax

- (void)onPrepareFile:(NSString*)path :(long long)fileSize :(int*)dataSource :(NSString**)localPath :(int*)action;
func onPrepareFile(_ path: String, _ fileSize: Int64, _ dataSource: inout Int32, _ localPath: inout NSString?, _ action: inout Int32)

Remarks

Class fires this event for every file included in the Files collection before commencing the compression. This is the last opportunity for your code to adjust the action to be taken for each file and tune up the data sources appropriately.

The Path parameter contains the path to the file within the archive (such as Photos/myphoto.jpg), and the FileSize contains the size of that file before compression.

The DataSource parameter indicates the media from which the file contents is to be taken. A typical default value if fdsFile, but you can adjust the value of that parameter if you need to use an alternative source. The following options are available:

fdsFile (0)The data will be taken from a file indicated by the LocalPath parameter. You can change this path in this event handler.
fdsStream (1)The file data will be taken from a stream assigned to FileStream property.
fdsBuffer (2)The data will be taken from a buffer attached to the FileData property.

Please do not assign FileStream or FileData in this event handler: this should be done further down the road in the BeforeCompressFile event handler. The purpose of this event is to prepare the compression plan by summarizing what should be done and to which files.

The Action parameter, which is also tuneable, indicates the action for class to take on the file:

atAdd (0)Add the file to the archive
atKeep (1)Keep the existing file in the archive
atUpdate (2)Update the archived file with a fresher copy
atDelete (3)Delete the file from the archive
atExtract (4)Extract the file (extraction only)
atSkip (5)Skip file extraction (extraction only)

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox Lite 2020 iOS Edition - Version 20.0 [Build 8166]