Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 0 additions & 217 deletions Source/UZKArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,45 +178,6 @@ extern NSString *UZKErrorDomain;
@property(nullable, strong) NSProgress *progress;


/**
* DEPRECATED: Creates and returns an archive at the given path
*
* @param filePath A path to the archive file
*
* @return Returns a UZKArchive object, or nil if the path isn't reachable
*/
+ (nullable instancetype)zipArchiveAtPath:(NSString *)filePath __deprecated_msg("Use -initWithPath:error: instead");

/**
* DEPRECATED: Creates and returns an archive at the given URL
*
* @param fileURL The URL of the archive file
*
* @return Returns a UZKArchive object, or nil if the URL isn't reachable
*/
+ (nullable instancetype)zipArchiveAtURL:(NSURL *)fileURL __deprecated_msg("Use -initWithURL:error: instead");

/**
* DEPRECATED: Creates and returns an archive at the given path, with a given password
*
* @param filePath A path to the archive file
* @param password The password of the given archive
*
* @return Returns a UZKArchive object, or nil if the path isn't reachable
*/
+ (nullable instancetype)zipArchiveAtPath:(NSString *)filePath password:(nullable NSString *)password __deprecated_msg("Use -initWithPath:password:error: instead");

/**
* DEPRECATED: Creates and returns an archive at the given URL, with a given password
*
* @param fileURL The URL of the archive file
* @param password The password of the given archive
*
* @return Returns a UZKArchive object, or nil if the URL isn't reachable
*/
+ (nullable instancetype)zipArchiveAtURL:(NSURL *)fileURL password:(nullable NSString *)password __deprecated_msg("Use -initWithURL:password:error: instead");;


/**
* Creates and returns an archive at the given path
*
Expand Down Expand Up @@ -318,25 +279,6 @@ extern NSString *UZKErrorDomain;
overwrite:(BOOL)overwrite
error:(NSError **)error;

/**
* **DEPRECATED:** Writes all files in the archive to the given path
*
* @param destinationDirectory The destination path of the unarchived files
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
* @param progress Called every so often to report the progress of the extraction
*
* - *currentFile* The info about the file that's being extracted
* - *percentArchiveDecompressed* The percentage of the archive that has been decompressed
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return YES on successful extraction, NO if an error was encountered
*/
- (BOOL)extractFilesTo:(NSString *)destinationDirectory
overwrite:(BOOL)overwrite
progress:(nullable void (^)(UZKFileInfo *currentFile, CGFloat percentArchiveDecompressed))progress
error:(NSError **)error __deprecated_msg("Use -extractFilesTo:overwrite:error: instead, and if using the progress block, replace with NSProgress as described in the README");

/**
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction
Expand All @@ -349,22 +291,6 @@ extern NSString *UZKErrorDomain;
- (nullable NSData *)extractData:(UZKFileInfo *)fileInfo
error:(NSError **)error;

/**
* **DEPRECATED:** Unarchive a single file from the archive into memory
*
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
* @param progress Called every so often to report the progress of the extraction
*
* - *percentDecompressed* The percentage of the archive that has been decompressed
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
*/
- (nullable NSData *)extractData:(UZKFileInfo *)fileInfo
progress:(nullable void (^)(CGFloat percentDecompressed))progress
error:(NSError **)error __deprecated_msg("Use -extractData:error: instead, and if using the progress block, replace with NSProgress as described in the README");

/**
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction
Expand All @@ -377,22 +303,6 @@ extern NSString *UZKErrorDomain;
- (nullable NSData *)extractDataFromFile:(NSString *)filePath
error:(NSError **)error;

/**
* **DEPRECATED:** Unarchive a single file from the archive into memory
*
* @param filePath The path of the file within the archive to be expanded
* @param progress Called every so often to report the progress of the extraction
*
* - *percentDecompressed* The percentage of the file that has been decompressed
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
*/
- (nullable NSData *)extractDataFromFile:(NSString *)filePath
progress:(nullable void (^)(CGFloat percentDecompressed))progress
error:(NSError **)error __deprecated_msg("Use -extractDataFromFile:error: instead, and if using the progress block, replace with NSProgress as described in the README");

/**
* Loops through each file in the archive into memory, allowing you to perform an action
* using its info. Supports NSProgress for progress reporting, which also
Expand Down Expand Up @@ -495,25 +405,6 @@ extern NSString *UZKErrorDomain;
filePath:(NSString *)filePath
error:(NSError **)error;

/**
* **DEPRECATED:** Writes the data to the zip file, overwriting it if a file of that name already exists in the
* archive
*
* @param data Data to write into the archive
* @param filePath The full path to the target file in the archive
* @param progress Called every so often to report the progress of the compression
*
* - *percentCompressed* The percentage of the file that has been compressed
*
* @param error Contains an NSError object when there was an error writing to the archive
*
* @return YES if successful, NO on error
*/
- (BOOL)writeData:(NSData *)data
filePath:(NSString *)filePath
progress:(nullable void (^)(CGFloat percentCompressed))progress
error:(NSError **)error __deprecated_msg("Use -writeData:filePath:error: instead, and if using the progress block, replace with NSProgress as described in the README");

/**
* Writes the data to the zip file, overwriting it if a file of that name already exists in the archive
*
Expand All @@ -529,26 +420,6 @@ extern NSString *UZKErrorDomain;
fileDate:(nullable NSDate *)fileDate
error:(NSError **)error;

/**
* **DEPRECATED:** Writes the data to the zip file, overwriting it if a file of that name already exists in the archive
*
* @param data Data to write into the archive
* @param filePath The full path to the target file in the archive
* @param fileDate The timestamp of the file in the archive. Uses the current time if nil
* @param progress Called every so often to report the progress of the compression
*
* - *percentCompressed* The percentage of the file that has been compressed
*
* @param error Contains an NSError object when there was an error writing to the archive
*
* @return YES if successful, NO on error
*/
- (BOOL)writeData:(NSData *)data
filePath:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
progress:(nullable void (^)(CGFloat percentCompressed))progress
error:(NSError **)error __deprecated_msg("Use -writeData:filePath:fileDate:error: instead, and if using the progress block, replace with NSProgress as described in the README");

/**
* Writes the data to the zip file, overwriting it if a file of that name already exists in the archive
*
Expand All @@ -568,30 +439,6 @@ compressionMethod:(UZKCompressionMethod)method
password:(nullable NSString *)password
error:(NSError **)error;

/**
* **DEPRECATED:** Writes the data to the zip file, overwriting it if a file of that name already exists in the archive
*
* @param data Data to write into the archive
* @param filePath The full path to the target file in the archive
* @param fileDate The timestamp of the file in the archive. Uses the current time if nil
* @param method The UZKCompressionMethod to use (Default, None, Fastest, Best)
* @param password Override the password associated with the archive (not recommended)
* @param progress Called every so often to report the progress of the compression
*
* - *percentCompressed* The percentage of the file that has been compressed
*
* @param error Contains an NSError object when there was an error writing to the archive
*
* @return YES if successful, NO on error
*/
- (BOOL)writeData:(NSData *)data
filePath:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
password:(nullable NSString *)password
progress:(nullable void (^)(CGFloat percentCompressed))progress
error:(NSError **)error __deprecated_msg("Use -writeData:filePath:fileDate:compressionMethod:password:error: instead, and if using the progress block, replace with NSProgress as described in the README");

/**
* Writes the data to the zip file, overwriting only if specified with the overwrite flag. Overwriting
* presents a tradeoff: the whole archive needs to be copied (minus the file to be overwritten) before
Expand Down Expand Up @@ -646,70 +493,6 @@ compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
error:(NSError **)error;

/**
* **DEPRECATED:** Writes the data to the zip file, overwriting only if specified with the overwrite flag. Overwriting
* presents a tradeoff: the whole archive needs to be copied (minus the file to be overwritten) before
* the write begins. For a large archive, this can be slow. On the other hand, when not overwriting,
* the size of the archive will grow each time the file is written.
*
* @param data Data to write into the archive
* @param filePath The full path to the target file in the archive
* @param fileDate The timestamp of the file in the archive. Uses the current time if nil
* @param method The UZKCompressionMethod to use (Default, None, Fastest, Best)
* @param password Override the password associated with the archive (not recommended)
* @param overwrite If YES, and the file exists, delete it before writing. If NO, append
* the data into the archive without removing it first (legacy Objective-Zip
* behavior)
* @param progress Called every so often to report the progress of the compression
*
* - *percentCompressed* The percentage of the file that has been compressed
*
* @param error Contains an NSError object when there was an error writing to the archive
*
* @return YES if successful, NO on error
*/
- (BOOL)writeData:(NSData *)data
filePath:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
password:(nullable NSString *)password
overwrite:(BOOL)overwrite
progress:(nullable void (^)(CGFloat percentCompressed))progress
error:(NSError **)error __deprecated_msg("Use -writeData:filePath:fileDate:compressionMethod:password:overwrite:error: instead, and if using the progress block, replace with NSProgress as described in the README");

/**
* **DEPRECATED:** Writes the data to the zip file, overwriting only if specified with the overwrite flag. Overwriting
* presents a tradeoff: the whole archive needs to be copied (minus the file to be overwritten) before
* the write begins. For a large archive, this can be slow. On the other hand, when not overwriting,
* the size of the archive will grow each time the file is written.
*
* @param data Data to write into the archive
* @param filePath The full path to the target file in the archive
* @param fileDate The timestamp of the file in the archive. Uses the current time if nil
* @param permissions The desired POSIX permissions of the file in the archive
* @param method The UZKCompressionMethod to use (Default, None, Fastest, Best)
* @param password Override the password associated with the archive (not recommended)
* @param overwrite If YES, and the file exists, delete it before writing. If NO, append
* the data into the archive without removing it first (legacy Objective-Zip
* behavior)
* @param progress Called every so often to report the progress of the compression
*
* - *percentCompressed* The percentage of the file that has been compressed
*
* @param error Contains an NSError object when there was an error writing to the archive
*
* @return YES if successful, NO on error
*/
- (BOOL)writeData:(NSData *)data
filePath:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
posixPermissions:(short)permissions
compressionMethod:(UZKCompressionMethod)method
password:(nullable NSString *)password
overwrite:(BOOL)overwrite
progress:(nullable void (^)(CGFloat percentCompressed))progress
error:(NSError **)error __deprecated_msg("Use -writeData:filePath:fileDate:permissions:compressionMethod:password:overwrite:error: instead, and if using the progress block, replace with NSProgress as described in the README");

/**
* Writes data to the zip file in pieces, allowing you to stream the write, so the entire contents
* don't need to reside in memory at once. It overwrites an existing file with the same name.
Expand Down
Loading