Added DockProgress to Carthage

Added DockProgress, plus commited projects
This commit is contained in:
Robert McGovern 2021-05-27 18:06:29 +01:00
parent 3413ef5210
commit 929688681b
452 changed files with 68122 additions and 0 deletions

View File

@ -1,2 +1,3 @@
github "abbeycode/UnrarKit"
github "abbeycode/UnzipKit"
github "sindresorhus/DockProgress"

3
Cartfile.resolved Normal file
View File

@ -0,0 +1,3 @@
github "abbeycode/UnrarKit" "2.9"
github "abbeycode/UnzipKit" "1.9"
github "sindresorhus/DockProgress" "v3.2.0"

11
Carthage/Build/.DockProgress.version generated vendored Normal file
View File

@ -0,0 +1,11 @@
{
"commitish" : "v3.2.0",
"Mac" : [
{
"hash" : "13e7fe07ca491fe900ae7c858e66797a66d0a2e1dffde3a2c0b64188b211012e",
"name" : "DockProgress",
"linking" : "dynamic",
"swiftToolchainVersion" : "5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)"
}
]
}

23
Carthage/Build/.UnrarKit.version generated vendored Normal file
View File

@ -0,0 +1,23 @@
{
"Mac" : [
{
"name" : "UnrarKit",
"hash" : "0ee8db439c431777277ec76976faa8a1d19ba93d3f6977094746350e942215d3",
"linking" : "dynamic"
}
],
"watchOS" : [
],
"tvOS" : [
],
"commitish" : "2.9",
"iOS" : [
{
"name" : "UnrarKit",
"hash" : "2c752a88c360be277b938f55190d07bc6688ce0452932b4fbf52a12e9bfcf5d0",
"linking" : "dynamic"
}
]
}

23
Carthage/Build/.UnzipKit.version generated vendored Normal file
View File

@ -0,0 +1,23 @@
{
"Mac" : [
{
"name" : "UnzipKit",
"hash" : "9abff02fa1d67e3e8a850a88223b68dc71c18639ddec837f69fd982b96ad7f65",
"linking" : "dynamic"
}
],
"watchOS" : [
],
"tvOS" : [
],
"commitish" : "1.9",
"iOS" : [
{
"name" : "UnzipKit",
"hash" : "9d5e11808c6d978519ec6c1e814060b11c9a804e102061d93a7d8004829f2614",
"linking" : "dynamic"
}
]
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.DockProgress</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>3.2.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

1
Carthage/Build/Mac/DockProgress.framework/DockProgress generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/DockProgress

1
Carthage/Build/Mac/DockProgress.framework/Headers generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Headers

1
Carthage/Build/Mac/DockProgress.framework/Modules generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Modules

1
Carthage/Build/Mac/DockProgress.framework/Resources generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Resources

Binary file not shown.

View File

@ -0,0 +1,444 @@
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
#ifndef DOCKPROGRESS_SWIFT_H
#define DOCKPROGRESS_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
#else
# define SWIFT_RELEASES_ARGUMENT
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DockProgress",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
#ifndef DOCKPROGRESS_SWIFT_H
#define DOCKPROGRESS_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
#else
# define SWIFT_RELEASES_ARGUMENT
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DockProgress",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#endif

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>20E241</string>
<key>CFBundleExecutable</key>
<string>DockProgress</string>
<key>CFBundleIdentifier</key>
<string>DockProgress</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>DockProgress</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.2.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12E262</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>11.3</string>
<key>DTSDKBuild</key>
<string>20E214</string>
<key>DTSDKName</key>
<string>macosx11.3</string>
<key>DTXcode</key>
<string>1250</string>
<key>DTXcodeBuild</key>
<string>12E262</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
</dict>
</plist>

View File

@ -0,0 +1 @@
A

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.com.abbey-code.UnrarKit</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>2.9</string>
<key>CFBundleVersion</key>
<string>2.9</string>
</dict>
</plist>

Binary file not shown.

1
Carthage/Build/Mac/UnrarKit.framework/Headers generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Headers

1
Carthage/Build/Mac/UnrarKit.framework/Modules generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Modules

1
Carthage/Build/Mac/UnrarKit.framework/Resources generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Resources

1
Carthage/Build/Mac/UnrarKit.framework/UnrarKit generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/UnrarKit

View File

@ -0,0 +1,496 @@
//
// URKArchive.h
// UnrarKit
//
//
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import "UnrarKitMacros.h"
RarosHppIgnore
#import "raros.hpp"
#pragma clang diagnostic pop
DllHppIgnore
#import "dll.hpp"
#pragma clang diagnostic pop
@class URKFileInfo;
/**
* Defines the various error codes that the listing and extraction methods return.
* These are returned in NSError's [code]([NSError code]) field.
*/
typedef NS_ENUM(NSInteger, URKErrorCode) {
/**
* The archive's header is empty
*/
URKErrorCodeEndOfArchive = ERAR_END_ARCHIVE,
/**
* The library ran out of memory while reading the archive
*/
URKErrorCodeNoMemory = ERAR_NO_MEMORY,
/**
* The header is broken
*/
URKErrorCodeBadData = ERAR_BAD_DATA,
/**
* The archive is not a valid RAR file
*/
URKErrorCodeBadArchive = ERAR_BAD_ARCHIVE,
/**
* The archive is an unsupported RAR format or version
*/
URKErrorCodeUnknownFormat = ERAR_UNKNOWN_FORMAT,
/**
* Failed to open a reference to the file
*/
URKErrorCodeOpen = ERAR_EOPEN,
/**
* Failed to create the target directory for extraction
*/
URKErrorCodeCreate = ERAR_ECREATE,
/**
* Failed to close the archive
*/
URKErrorCodeClose = ERAR_ECLOSE,
/**
* Failed to read the archive
*/
URKErrorCodeRead = ERAR_EREAD,
/**
* Failed to write a file to disk
*/
URKErrorCodeWrite = ERAR_EWRITE,
/**
* The archive header's comments are larger than the buffer size
*/
URKErrorCodeSmall = ERAR_SMALL_BUF,
/**
* The cause of the error is unspecified
*/
URKErrorCodeUnknown = ERAR_UNKNOWN,
/**
* A password was not given for a password-protected archive
*/
URKErrorCodeMissingPassword = ERAR_MISSING_PASSWORD,
/**
* No data was returned from the archive
*/
URKErrorCodeArchiveNotFound = 101,
/**
* User cancelled the operation
*/
URKErrorCodeUserCancelled = 102,
/**
* Error converting string to UTF-8
*/
URKErrorCodeStringConversion = 103,
};
typedef NSString *const URKProgressInfoKey;
/**
* Defines the keys passed in `-[NSProgress userInfo]` for certain methods
*/
static URKProgressInfoKey _Nonnull
/**
* For `extractFilesTo:overwrite:error:`, this key contains an instance of URKFileInfo with the file currently being extracted
*/
URKProgressInfoKeyFileInfoExtracting = @"URKProgressInfoKeyFileInfoExtracting";
NS_ASSUME_NONNULL_BEGIN
extern NSString *URKErrorDomain;
/**
* An Objective-C/Cocoa wrapper around the unrar library
*/
@interface URKArchive : NSObject
// Minimum of iOS 9, macOS 10.11 SDKs
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED > 90000) || (defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
<NSProgressReporting>
#endif
/**
* The URL of the archive
*/
@property(nullable, weak, atomic, readonly) NSURL *fileURL;
/**
* The filename of the archive
*/
@property(nullable, weak, atomic, readonly) NSString *filename;
/**
* The password of the archive
*/
@property(nullable, nonatomic, strong) NSString *password;
/**
* The total uncompressed size (in bytes) of all files in the archive. Returns nil on errors
*/
@property(nullable, atomic, readonly) NSNumber *uncompressedSize;
/**
* The total compressed size (in bytes) of the archive. Returns nil on errors
*/
@property(nullable, atomic, readonly) NSNumber *compressedSize;
/**
* True if the file is one volume of a multi-part archive
*/
@property(atomic, readonly) BOOL hasMultipleVolumes;
/**
* Can be used for progress reporting, but it's not necessary. You can also use
* implicit progress reporting. If you don't use it, one will still be created,
* which will become a child progress of whichever one is the current NSProgress
* instance.
*
* To use this, assign it before beginning an operation that reports progress. Once
* the method you're calling has a reference to it, it will nil it out. Please check
* for nil before assigning it to avoid concurrency conflicts.
*/
@property(nullable, strong) NSProgress *progress;
/**
* **DEPRECATED:** Creates and returns an archive at the given path
*
* @param filePath A path to the archive file
*/
+ (nullable instancetype)rarArchiveAtPath:(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
*/
+ (nullable instancetype)rarArchiveAtURL:(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 passowrd of the given archive
*/
+ (nullable instancetype)rarArchiveAtPath:(NSString *)filePath password:(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 passowrd of the given archive
*/
+ (nullable instancetype)rarArchiveAtURL:(NSURL *)fileURL password:(NSString *)password __deprecated_msg("Use -initWithURL:password:error: instead");
/**
* Do not use the default initializer
*/
- (instancetype)init NS_UNAVAILABLE;
/**
* Creates and returns an archive at the given path
*
* @param filePath A path to the archive file
* @param error Contains any error during initialization
*
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the path
*/
- (nullable instancetype)initWithPath:(NSString *)filePath error:(NSError **)error;
/**
* Creates and returns an archive at the given URL
*
* @param fileURL The URL of the archive file
* @param error Contains any error during initialization
*
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the URL
*/
- (nullable instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
/**
* Creates and returns an archive at the given path, with a given password
*
* @param filePath A path to the archive file
* @param password The passowrd of the given archive
* @param error Contains any error during initialization
*
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the path
*/
- (nullable instancetype)initWithPath:(NSString *)filePath password:(NSString *)password error:(NSError **)error;
/**
* Creates and returns an archive at the given URL, with a given password
*
* @param fileURL The URL of the archive file
* @param password The passowrd of the given archive
* @param error Contains any error during initialization
*
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the URL
*/
- (nullable instancetype)initWithURL:(NSURL *)fileURL password:(NSString *)password error:(NSError **)error;
/**
* Determines whether a file is a RAR archive by reading the signature
*
* @param filePath Path to the file being checked
*
* @return YES if the file exists and contains a signature indicating it is a RAR archive
*/
+ (BOOL)pathIsARAR:(NSString *)filePath;
/**
* Determines whether a file is a RAR archive by reading the signature
*
* @param fileURL URL of the file being checked
*
* @return YES if the file exists and contains a signature indicating it is a RAR archive
*/
+ (BOOL)urlIsARAR:(NSURL *)fileURL;
/**
* Lists the names of the files in the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of NSString containing the paths within the archive's contents, or nil if an error was encountered
*/
- (nullable NSArray<NSString*> *)listFilenames:(NSError **)error;
/**
* Lists the various attributes of each file in the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of URKFileInfo objects, which contain metadata about the archive's files, or nil if an error was encountered
*/
- (nullable NSArray<URKFileInfo*> *)listFileInfo:(NSError **)error;
/**
* Iterates the header of the archive, calling the block with each archived file's info.
*
* WARNING: There is no filtering of duplicate header entries. If a file is listed twice, `action`
* will be called twice with that file's path
*
* @param action The action to perform using the data. Must be non-nil
*
* - *fileInfo* The metadata of the file within the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns NO if an error was encountered
*/
- (BOOL) iterateFileInfo:(void(^)(URKFileInfo *fileInfo, BOOL *stop))action
error:(NSError **)error;
/**
* Lists the URLs of volumes in a single- or multi-volume archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns the list of URLs of all volumes of the archive
*/
- (nullable NSArray<NSURL*> *)listVolumeURLs:(NSError **)error;
/**
* Writes all files in the archive to the given path. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction. Use the progress property (as explained in the README) to
* retrieve more detailed information, such as the current file being extracted, number of files extracted,
* and the URKFileInfo instance being extracted
*
* @param filePath The destination path of the unarchived files
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
* @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 *)filePath
overwrite:(BOOL)overwrite
error:(NSError **)error;
/**
* **DEPRECATED:** Writes all files in the archive to the given path
*
* @param filePath The destination path of the unarchived files
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
* @param progressBlock 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 *)filePath
overwrite:(BOOL)overwrite
progress:(nullable void (^)(URKFileInfo *currentFile, CGFloat percentArchiveDecompressed))progressBlock
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
*
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
* @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:(URKFileInfo *)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 progressBlock 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:(URKFileInfo *)fileInfo
progress:(nullable void (^)(CGFloat percentDecompressed))progressBlock
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
*
* @param filePath The path of the file within the archive to be expanded
*
* - *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
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 progressBlock 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))progressBlock
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 in alphabetical order, allowing you to perform an
* action using its info. Supports NSProgress for progress reporting, which also allows
* cancellation of the operation in the middle
*
* @param action The action to perform using the data
*
* - *fileInfo* The metadata of the file within the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an error if any was returned
*
* @return YES if no errors were encountered, NO otherwise
*/
- (BOOL)performOnFilesInArchive:(void(^)(URKFileInfo *fileInfo, BOOL *stop))action
error:(NSError **)error;
/**
* Extracts each file in the archive into memory, allowing you to perform an action
* on it (not sorted). Supports NSProgress for progress reporting, which also allows
* cancellation of the operation in the middle
*
* @param action The action to perform using the data
*
* - *fileInfo* The metadata of the file within the archive
* - *fileData* The full data of the file in the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an error if any was returned
*
* @return YES if no errors were encountered, NO otherwise
*/
- (BOOL)performOnDataInArchive:(void(^)(URKFileInfo *fileInfo, NSData *fileData, BOOL *stop))action
error:(NSError **)error;
/**
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction
*
* @param filePath The path of the file within the archive to be expanded
* @param error Contains an NSError object when there was an error reading the archive
* @param action The block to run for each chunk of data, each of size <= bufferSize
*
* - *dataChunk* The data read from the archived file. Read bytes and length to write the data
* - *percentDecompressed* The percentage of the file that has been decompressed
*
* @return YES if all data was read successfully, NO if an error was encountered
*/
- (BOOL)extractBufferedDataFromFile:(NSString *)filePath
error:(NSError **)error
action:(void(^)(NSData *dataChunk, CGFloat percentDecompressed))action;
/**
* YES if archive protected with a password, NO otherwise
*/
- (BOOL)isPasswordProtected;
/**
* Tests whether the provided password unlocks the archive
*
* @return YES if correct password or archive is not password protected, NO if password is wrong
*/
- (BOOL)validatePassword;
/**
Extract each file in the archive, checking whether the data matches the CRC checksum
stored at the time it was written
@return YES if the data is all correct, false if any check failed
*/
- (BOOL)checkDataIntegrity;
/**
Extract a particular file, to determine if its data matches the CRC
checksum stored at the time it written
@param filePath The file in the archive to check
@return YES if the data is correct, false if any check failed
*/
- (BOOL)checkDataIntegrityOfFile:(NSString *)filePath;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,158 @@
//
// URKFileInfo.h
// UnrarKit
//
#import <Foundation/Foundation.h>
#import "UnrarKitMacros.h"
RarosHppIgnore
#import "raros.hpp"
#pragma clang diagnostic pop
DllHppIgnore
#import "dll.hpp"
#pragma clang diagnostic pop
/* See http://www.forensicswiki.org/wiki/RAR and
http://www.rarlab.com/technote.htm#filehead for
more information about the RAR File Header spec */
/**
* Defines the packing methods that can be used on a file in an archive
*/
typedef NS_ENUM(NSUInteger, URKCompressionMethod) {
/**
* No compression is used
*/
URKCompressionMethodStorage = 0x30,
/**
* Fastest compression
*/
URKCompressionMethodFastest = 0x31,
/**
* Fast compression
*/
URKCompressionMethodFast = 0x32,
/**
* Normal compression
*/
URKCompressionMethodNormal = 0x33,
/**
* Good compression
*/
URKCompressionMethodGood = 0x34,
/**
* Best compression
*/
URKCompressionMethodBest = 0x35,
};
/**
* Defines the various operating systems that can be used when archiving
*/
typedef NS_ENUM(NSUInteger, URKHostOS) {
/**
* MS-DOS
*/
URKHostOSMSDOS = 0,
/**
* OS/2
*/
URKHostOSOS2 = 1,
/**
* Windows
*/
URKHostOSWindows = 2,
/**
* Unix
*/
URKHostOSUnix = 3,
/**
* Mac OS
*/
URKHostOSMacOS = 4,
/**
* BeOS
*/
URKHostOSBeOS = 5,
};
/**
* A wrapper around a RAR archive's file header, defining the various fields
* it contains
*/
@interface URKFileInfo : NSObject
/**
* The name of the file's archive
*/
@property (readonly, strong) NSString *archiveName;
/**
* The name of the file
*/
@property (readonly, strong) NSString *filename;
/**
* The timestamp of the file
*/
@property (readonly, strong) NSDate *timestamp;
/**
* The CRC checksum of the file
*/
@property (readonly, assign) NSUInteger CRC;
/**
* Size of the uncompressed file
*/
@property (readonly, assign) long long uncompressedSize;
/**
* Size of the compressed file
*/
@property (readonly, assign) long long compressedSize;
/**
* YES if the file will be continued of the next volume
*/
@property (readonly) BOOL isEncryptedWithPassword;
/**
* YES if the file is a directory
*/
@property (readonly) BOOL isDirectory;
/**
* The type of compression
*/
@property (readonly, assign) URKCompressionMethod compressionMethod;
/**
* The OS of the file
*/
@property (readonly, assign) URKHostOS hostOS;
/**
* Returns a URKFileInfo instance for the given extended header data
*
* @param fileHeader The header data for a RAR file
*
* @return an instance of URKFileInfo
*/
+ (instancetype) fileInfo:(struct RARHeaderDataEx *)fileHeader;
@end

View File

@ -0,0 +1,19 @@
//
// UnrarKit.h
// UnrarKit
//
// Created by Dov Frankel on 1/9/2015.
// Copyright (c) 2015 Abbey Code. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for UnrarKit.
FOUNDATION_EXPORT double UnrarKitVersionNumber;
//! Project version string for UnrarKit.
FOUNDATION_EXPORT const unsigned char UnrarKitVersionString[];
#import "URKArchive.h"
#import "URKFileInfo.h"

View File

@ -0,0 +1,126 @@
//
// UnrarKitMacros.h
// UnrarKit
//
// Created by Dov Frankel on 8/8/17.
// Copyright © 2017 Abbey Code. All rights reserved.
//
#ifndef UnrarKitMacros_h
#define UnrarKitMacros_h
//#import "Availability.h"
//#import "AvailabilityInternal.h"
#define _stringify(a) #a
#define RarHppIgnore \
_Pragma( _stringify( clang diagnostic push ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wcast-align" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wextra-semi" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wold-style-cast" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wpadded" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wshorten-64-to-32" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wcast-qual" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wundef" ) ) \
#define DllHppIgnore \
_Pragma( _stringify( clang diagnostic push ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wstrict-prototypes" ) ) \
#define RarosHppIgnore \
_Pragma( _stringify( clang diagnostic push ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundef"
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
// iOS 10, macOS 10.12, tvOS 10.0, watchOS 3.0
#define UNIFIED_LOGGING_SUPPORTED \
__IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 \
|| __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 \
|| __TV_OS_VERSION_MIN_REQUIRED >= 100000 \
|| __WATCH_OS_VERSION_MIN_REQUIRED >= 30000
#if TARGET_OS_IPHONE
#define SDK_10_13_MAJOR 11
#define SDK_10_13_MINOR 0
#else
#define SDK_10_13_MAJOR 10
#define SDK_10_13_MINOR 13
#endif
#if UNIFIED_LOGGING_SUPPORTED
#import <os/log.h>
#import <os/activity.h>
// Called from +[UnrarKit initialize] and +[URKArchiveTestCase setUp]
extern os_log_t unrarkit_log; // Declared in URKArchive.m
extern BOOL unrarkitIsAtLeast10_13SDK; // Declared in URKArchive.m
#define URKLogInit() \
unrarkit_log = os_log_create("com.abbey-code.UnrarKit", "General"); \
\
NSOperatingSystemVersion minVersion; \
minVersion.majorVersion = SDK_10_13_MAJOR; \
minVersion.minorVersion = SDK_10_13_MINOR; \
minVersion.patchVersion = 0; \
unrarkitIsAtLeast10_13SDK = [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:minVersion]; \
URKLogDebug("Is >= 10.13 (or iOS 11): %@", unrarkitIsAtLeast10_13SDK ? @"YES" : @"NO");
#define URKLog(format, ...) os_log(unrarkit_log, format, ##__VA_ARGS__);
#define URKLogInfo(format, ...) os_log_info(unrarkit_log, format, ##__VA_ARGS__);
#define URKLogDebug(format, ...) os_log_debug(unrarkit_log, format, ##__VA_ARGS__);
#define URKLogError(format, ...) \
if (unrarkitIsAtLeast10_13SDK) os_log_error(unrarkit_log, format, ##__VA_ARGS__); \
else os_log_with_type(unrarkit_log, OS_LOG_TYPE_ERROR, format, ##__VA_ARGS__);
#define URKLogFault(format, ...) \
if (unrarkitIsAtLeast10_13SDK) os_log_fault(unrarkit_log, format, ##__VA_ARGS__); \
else os_log_with_type(unrarkit_log, OS_LOG_TYPE_FAULT, format, ##__VA_ARGS__);
#define URKCreateActivity(name) \
os_activity_t activity = os_activity_create(name, OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT); \
os_activity_scope(activity);
#else // Fall back to regular NSLog
// No-op, as nothing needs to be initialized
#define URKLogInit() (void)0
// Only used below
#define _removeLogFormatTokens(format) [[@format \
stringByReplacingOccurrencesOfString:@"{public}" withString:@""] \
stringByReplacingOccurrencesOfString:@"{iec-bytes}" withString:@""]
#define _nsLogWithoutWarnings(format, ...) \
_Pragma( _stringify( clang diagnostic push ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wformat-nonliteral" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wformat-security" ) ) \
NSLog(_removeLogFormatTokens(format), ##__VA_ARGS__); \
_Pragma( _stringify( clang diagnostic pop ) )
// All levels do the same thing
#define URKLog(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
#define URKLogInfo(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
#define URKLogDebug(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
#define URKLogError(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
#define URKLogFault(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
// No-op, as no equivalent to Activities exists
#define URKCreateActivity(name) (void)0
#pragma clang diagnostic pop
#endif // UNIFIED_LOGGING_SUPPORTED
#endif /* UnrarKitMacros_h */

View File

@ -0,0 +1,185 @@
#ifndef _UNRAR_DLL_
#define _UNRAR_DLL_
#pragma pack(1)
#define ERAR_SUCCESS 0
#define ERAR_END_ARCHIVE 10
#define ERAR_NO_MEMORY 11
#define ERAR_BAD_DATA 12
#define ERAR_BAD_ARCHIVE 13
#define ERAR_UNKNOWN_FORMAT 14
#define ERAR_EOPEN 15
#define ERAR_ECREATE 16
#define ERAR_ECLOSE 17
#define ERAR_EREAD 18
#define ERAR_EWRITE 19
#define ERAR_SMALL_BUF 20
#define ERAR_UNKNOWN 21
#define ERAR_MISSING_PASSWORD 22
#define ERAR_EREFERENCE 23
#define ERAR_BAD_PASSWORD 24
#define RAR_OM_LIST 0
#define RAR_OM_EXTRACT 1
#define RAR_OM_LIST_INCSPLIT 2
#define RAR_SKIP 0
#define RAR_TEST 1
#define RAR_EXTRACT 2
#define RAR_VOL_ASK 0
#define RAR_VOL_NOTIFY 1
#define RAR_DLL_VERSION 8
#define RAR_HASH_NONE 0
#define RAR_HASH_CRC32 1
#define RAR_HASH_BLAKE2 2
#ifdef _UNIX
#define CALLBACK
#define PASCAL
#define LONG long
#define HANDLE void *
#define LPARAM long
#define UINT unsigned int
#endif
#define RHDF_SPLITBEFORE 0x01
#define RHDF_SPLITAFTER 0x02
#define RHDF_ENCRYPTED 0x04
#define RHDF_SOLID 0x10
#define RHDF_DIRECTORY 0x20
struct RARHeaderData
{
char ArcName[260];
char FileName[260];
unsigned int Flags;
unsigned int PackSize;
unsigned int UnpSize;
unsigned int HostOS;
unsigned int FileCRC;
unsigned int FileTime;
unsigned int UnpVer;
unsigned int Method;
unsigned int FileAttr;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
};
struct RARHeaderDataEx
{
char ArcName[1024];
wchar_t ArcNameW[1024];
char FileName[1024];
wchar_t FileNameW[1024];
unsigned int Flags;
unsigned int PackSize;
unsigned int PackSizeHigh;
unsigned int UnpSize;
unsigned int UnpSizeHigh;
unsigned int HostOS;
unsigned int FileCRC;
unsigned int FileTime;
unsigned int UnpVer;
unsigned int Method;
unsigned int FileAttr;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
unsigned int DictSize;
unsigned int HashType;
char Hash[32];
unsigned int RedirType;
wchar_t *RedirName;
unsigned int RedirNameSize;
unsigned int DirTarget;
unsigned int MtimeLow;
unsigned int MtimeHigh;
unsigned int CtimeLow;
unsigned int CtimeHigh;
unsigned int AtimeLow;
unsigned int AtimeHigh;
unsigned int Reserved[988];
};
struct RAROpenArchiveData
{
char *ArcName;
unsigned int OpenMode;
unsigned int OpenResult;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
};
typedef int (CALLBACK *UNRARCALLBACK)(UINT msg,LPARAM UserData,LPARAM P1,LPARAM P2);
#define ROADF_VOLUME 0x0001
#define ROADF_COMMENT 0x0002
#define ROADF_LOCK 0x0004
#define ROADF_SOLID 0x0008
#define ROADF_NEWNUMBERING 0x0010
#define ROADF_SIGNED 0x0020
#define ROADF_RECOVERY 0x0040
#define ROADF_ENCHEADERS 0x0080
#define ROADF_FIRSTVOLUME 0x0100
struct RAROpenArchiveDataEx
{
char *ArcName;
wchar_t *ArcNameW;
unsigned int OpenMode;
unsigned int OpenResult;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
unsigned int Flags;
UNRARCALLBACK Callback;
LPARAM UserData;
unsigned int Reserved[28];
};
enum UNRARCALLBACK_MESSAGES {
UCM_CHANGEVOLUME,UCM_PROCESSDATA,UCM_NEEDPASSWORD,UCM_CHANGEVOLUMEW,
UCM_NEEDPASSWORDW
};
typedef int (PASCAL *CHANGEVOLPROC)(char *ArcName,int Mode);
typedef int (PASCAL *PROCESSDATAPROC)(unsigned char *Addr,int Size);
#ifdef __cplusplus
extern "C" {
#endif
HANDLE PASCAL RAROpenArchive(struct RAROpenArchiveData *ArchiveData);
HANDLE PASCAL RAROpenArchiveEx(struct RAROpenArchiveDataEx *ArchiveData);
int PASCAL RARCloseArchive(HANDLE hArcData);
int PASCAL RARReadHeader(HANDLE hArcData,struct RARHeaderData *HeaderData);
int PASCAL RARReadHeaderEx(HANDLE hArcData,struct RARHeaderDataEx *HeaderData);
int PASCAL RARProcessFile(HANDLE hArcData,int Operation,char *DestPath,char *DestName);
int PASCAL RARProcessFileW(HANDLE hArcData,int Operation,wchar_t *DestPath,wchar_t *DestName);
void PASCAL RARSetCallback(HANDLE hArcData,UNRARCALLBACK Callback,LPARAM UserData);
void PASCAL RARSetChangeVolProc(HANDLE hArcData,CHANGEVOLPROC ChangeVolProc);
void PASCAL RARSetProcessDataProc(HANDLE hArcData,PROCESSDATAPROC ProcessDataProc);
void PASCAL RARSetPassword(HANDLE hArcData,char *Password);
int PASCAL RARGetDllVersion();
#ifdef __cplusplus
}
#endif
#pragma pack()
#endif

View File

@ -0,0 +1,36 @@
#ifndef _RAR_RAROS_
#define _RAR_RAROS_
#ifdef __EMX__
#define _EMX
#endif
#ifdef __DJGPP__
#define _DJGPP
#define _EMX
#endif
#if defined(__WIN32__) || defined(_WIN32)
#define _WIN_ALL // Defined for all Windows platforms, 32 and 64 bit, mobile and desktop.
#ifdef _M_X64
#define _WIN_64
#else
#define _WIN_32
#endif
#endif
#if defined(ANDROID) || defined(__ANDROID__)
#define _UNIX
#define _ANDROID
#endif
#ifdef __APPLE__
#define _UNIX
#define _APPLE
#endif
#if !defined(_EMX) && !defined(_WIN_ALL) && !defined(_BEOS) && !defined(_APPLE)
#define _UNIX
#endif
#endif

View File

@ -0,0 +1,6 @@
framework module UnrarKit {
umbrella header "UnrarKit.h"
export *
module * { export * }
}

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17D47</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>UnrarKit</string>
<key>CFBundleIdentifier</key>
<string>com.abbey-code.UnrarKit</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>UnrarKit</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2.9</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9E145</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>17E189</string>
<key>DTSDKName</key>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0930</string>
<key>DTXcodeBuild</key>
<string>9E145</string>
</dict>
</plist>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17D47</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.abbey-code.UnrarKitResources</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>UnrarKitResources</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2.9</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9E145</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>17E189</string>
<key>DTSDKName</key>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0930</string>
<key>DTXcodeBuild</key>
<string>9E145</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 Abbey Code. All rights reserved.</string>
</dict>
</plist>

BIN
Carthage/Build/Mac/UnrarKit.framework/Versions/A/UnrarKit generated vendored Executable file

Binary file not shown.

1
Carthage/Build/Mac/UnrarKit.framework/Versions/Current generated vendored Symbolic link
View File

@ -0,0 +1 @@
A

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.com.abbey-code.UnzipKit</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.9</string>
<key>CFBundleVersion</key>
<string>1.9</string>
</dict>
</plist>

Binary file not shown.

1
Carthage/Build/Mac/UnzipKit.framework/Headers generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Headers

1
Carthage/Build/Mac/UnzipKit.framework/Modules generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Modules

1
Carthage/Build/Mac/UnzipKit.framework/PrivateHeaders generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/PrivateHeaders

1
Carthage/Build/Mac/UnzipKit.framework/Resources generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/Resources

1
Carthage/Build/Mac/UnzipKit.framework/UnzipKit generated vendored Symbolic link
View File

@ -0,0 +1 @@
Versions/Current/UnzipKit

View File

@ -0,0 +1,949 @@
//
// UZKArchive.h
// UnzipKit
//
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import "UZKFileInfo.h"
/**
* Defines the various error codes that the listing and extraction methods return.
* These are returned in NSError's [code]([NSError code]) field.
*/
typedef NS_ENUM(NSInteger, UZKErrorCode) {
/**
* An error from zlib reading or writing the file (UNZ_ERRNO/ZIP_ERRNO)
*/
UZKErrorCodeZLibError = -1,
/**
* An error with a parameter, usually the file name (UNZ_PARAMERROR/ZIP_PARAMERROR)
*/
UZKErrorCodeParameterError = -102,
/**
* The Zip file appears to be corrupted, or invalid (UNZ_BADZIPFILE/ZIP_BADZIPFILE)
*/
UZKErrorCodeBadZipFile = -103,
/**
* An error internal to MiniZip (UNZ_INTERNALERROR/ZIP_INTERNALERROR)
*/
UZKErrorCodeInternalError = -104,
/**
* The decompressed file's CRC doesn't match the original file's CRC (UNZ_CRCERROR)
*/
UZKErrorCodeCRCError = -105,
/**
* Failure to find/open the archive
*/
UZKErrorCodeArchiveNotFound = 101,
/**
* Error reading or advancing through the archive
*/
UZKErrorCodeFileNavigationError = 102,
/**
* Error finding a file in the archive
*/
UZKErrorCodeFileNotFoundInArchive = 103,
/**
* Error writing an extracted file to disk
*/
UZKErrorCodeOutputError = 104,
/**
* The destination directory is a file. Not used anymore
*/
UZKErrorCodeOutputErrorPathIsAFile = 105,
/**
* Password given doesn't decrypt the archive
*/
UZKErrorCodeInvalidPassword = 106,
/**
* Error reading a file in the archive
*/
UZKErrorCodeFileRead = 107,
/**
* Error opening a file in the archive for writing
*/
UZKErrorCodeFileOpenForWrite = 108,
/**
* Error writing a file in the archive
*/
UZKErrorCodeFileWrite = 109,
/**
* Error closing the file in the archive
*/
UZKErrorCodeFileCloseWriting = 110,
/**
* Error deleting a file in the archive
*/
UZKErrorCodeDeleteFile = 111,
/**
* Tried to read before all writes have completed, or vise-versa
*/
UZKErrorCodeMixedModeAccess = 112,
/**
* Error reading the global comment of the archive
*/
UZKErrorCodeReadComment = 113,
/**
* The CRC given up front doesn't match the calculated CRC
*/
UZKErrorCodePreCRCMismatch = 114,
/**
* The zip is compressed using Deflate64 (compression method 9), which isn't supported
*/
UZKErrorCodeDeflate64 = 115,
/**
* User cancelled the operation
*/
UZKErrorCodeUserCancelled = 116,
};
typedef NSString *const UZKProgressInfoKey;
/**
* Defines the keys passed in `-[NSProgress userInfo]` for certain methods
*/
static UZKProgressInfoKey _Nonnull
/**
* For `extractFilesTo:overwrite:error:`, this key contains an instance of URKFileInfo with the file currently being extracted
*/
UZKProgressInfoKeyFileInfoExtracting = @"UZKProgressInfoKeyFileInfoExtracting";
NS_ASSUME_NONNULL_BEGIN
extern NSString *UZKErrorDomain;
@interface UZKArchive : NSObject
// Minimum of iOS 9, macOS 10.11 SDKs
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED > 90000) || (defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
<NSProgressReporting>
#endif
/**
* The URL of the archive. Returns nil if the URL becomes unreachable
*/
@property(weak, nonatomic, readonly, nullable) NSURL *fileURL;
/**
* The filename of the archive. Returns nil if the archive file becomes unreachable
*/
@property(weak, nonatomic, readonly, nullable) NSString *filename;
/**
* The password of the archive
*/
@property(strong, nullable) NSString *password;
/**
* The global comment inside the archive
*
* Comments are written in UTF-8, and read in UTF-8 and Windows/CP-1252, falling back to defaultCStringEncoding
*/
@property(retain, atomic, nullable) NSString *comment;
/**
* Can be used for progress reporting, but it's not necessary. You can also use
* implicit progress reporting. If you don't use it, one will still be created,
* which will become a child progress of whichever one is the current NSProgress
* instance.
*
* To use this, assign it before beginning an operation that reports progress. Once
* the method you're calling has a reference to it, it will nil it out. Please check
* for nil before assigning it to avoid concurrency conflicts.
*/
@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
*
* @param filePath A path to the archive file
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the path isn't reachable
*/
- (nullable instancetype)initWithPath:(NSString *)filePath error:(NSError **)error;
/**
* Creates and returns an archive at the given URL
*
* @param fileURL The URL of the archive file
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the URL isn't reachable
*/
- (nullable instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
/**
* 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
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the path isn't reachable
*/
- (nullable instancetype)initWithPath:(NSString *)filePath password:(nullable NSString *)password error:(NSError **)error;
/**
* 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
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the URL isn't reachable
*/
- (nullable instancetype)initWithURL:(NSURL *)fileURL password:(nullable NSString *)password error:(NSError **)error;
#pragma mark - Read Methods
/**
* Determines whether a file is a Zip file by reading the header
*
* @param filePath Path to the file being checked
*
* @return YES if the file exists and contains a signature indicating it is a Zip file
*/
+ (BOOL)pathIsAZip:(NSString *)filePath;
/**
* Determines whether a file is a Zip file by reading the header
*
* @param fileURL URL of the file being checked
*
* @return YES if the file exists and contains a signature indicating it is a Zip file
*/
+ (BOOL)urlIsAZip:(NSURL *)fileURL;
/**
* Lists the names of the files in the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of NSString containing the paths within the archive's contents, or nil if an error was encountered
*/
- (nullable NSArray<NSString*> *)listFilenames:(NSError **)error;
/**
* Lists the various attributes of each file in the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of UZKFileInfo objects, which contain metadata about the archive's files, or nil if an error was encountered
*/
- (nullable NSArray<UZKFileInfo*> *)listFileInfo:(NSError **)error;
/**
* Writes all files in the archive to the given path. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction. Use the progress property (as explained in the README) to
* retrieve more detailed information, such as the current file being extracted, number of files extracted,
* and the URKFileInfo instance being extracted
*
* @param destinationDirectory The destination path of the unarchived files
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
*
* @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
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
*
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
* @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
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
*
* @param filePath The path of the file within the archive to be expanded
* @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
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
* allows cancellation in the middle of the operation
*
* @param action The action to perform using the data
*
* - *fileInfo* The metadata of the file within the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an error if any was returned
*
* @return YES if no errors were encountered, NO otherwise
*/
- (BOOL)performOnFilesInArchive:(void(^)(UZKFileInfo *fileInfo, BOOL *stop))action
error:(NSError **)error;
/**
* Extracts each file in the archive into memory, allowing you to perform an action
* on it. Supports NSProgress for progress reporting, which also allows cancellation
* in the middle of the operation
*
* @param action The action to perform using the data
*
* - *fileInfo* The metadata of the file within the archive
* - *fileData* The full data of the file in the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an error if any was returned
*
* @return YES if no errors were encountered, NO otherwise
*/
- (BOOL)performOnDataInArchive:(void(^)(UZKFileInfo *fileInfo, NSData *fileData, BOOL *stop))action
error:(NSError **)error;
/**
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction
*
* @param filePath The path of the file within the archive to be expanded
* @param error Contains an NSError object when there was an error reading the archive
* @param action The block to run for each chunk of data, each of size <= bufferSize
*
* - *dataChunk* The data read from the archived file. Read bytes and length to write the data
* - *percentDecompressed* The percentage of the file that has been decompressed
*
* @return YES if all data was read successfully, NO if an error was encountered
*/
- (BOOL)extractBufferedDataFromFile:(NSString *)filePath
error:(NSError **)error
action:(void(^)(NSData *dataChunk, CGFloat percentDecompressed))action;
/**
* YES if archive protected with a password, NO otherwise
*/
- (BOOL)isPasswordProtected;
/**
* Tests whether the provided password unlocks the archive
*
* @return YES if correct password or archive is not password protected, NO if password is wrong
*/
- (BOOL)validatePassword;
/**
Extract each file in the archive, checking whether the data matches the CRC checksum
stored at the time it was written
@return YES if the data is all correct, false if any check failed
*/
- (BOOL)checkDataIntegrity;
/**
Extract a particular file, to determine if its data matches the CRC
checksum stored at the time it written
@param filePath The file in the archive to check
@return YES if the data is correct, false if any check failed
*/
- (BOOL)checkDataIntegrityOfFile:(NSString *)filePath;
#pragma mark - Write Methods
/**
* Writes the data to the zip file, overwriting it if a file of that name already exists
* in the archive. Supports NSProgress for progress reporting, which DOES NOT allow cancellation
* in the middle of writing
*
* @param data Data to write into the archive
* @param filePath The full path to the target file in the archive
* @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
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
*
* @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 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
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
*
* @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 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
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
* 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 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
error:(NSError **)error;
/**
* 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 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
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.
*
* @param filePath The full path to the target file in the archive
* @param error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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.
*
* @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 error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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.
*
* @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 error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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, 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 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 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 error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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, 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 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 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 preCRC The CRC-32 for the data being sent. Only necessary if encrypting the file.
Pass 0 otherwise
* @param error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
CRC:(unsigned long)preCRC
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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, 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 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 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 preCRC The CRC-32 for the data being sent. Only necessary if encrypting the file.
* Pass 0 otherwise
* @param password Override the password associated with the archive (not recommended)
* @param error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
CRC:(unsigned long)preCRC
password:(nullable NSString *)password
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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, 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 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 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 preCRC The CRC-32 for the data being sent. Only necessary if encrypting the file.
* Pass 0 otherwise
* @param password Override the password associated with the archive (not recommended)
* @param error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
posixPermissions:(short)permissions
compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
CRC:(unsigned long)preCRC
password:(nullable NSString *)password
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* Removes the given file from the archive
*
* @param filePath The file in the archive you wish to delete
* @param error Contains an NSError object when there was an error writing to the archive
*
* @return YES if the file was successfully deleted, NO otherwise
*/
- (BOOL)deleteFile:(NSString *)filePath error:(NSError **)error;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,90 @@
//
// UZKFileInfo.h
// UnzipKit
//
//
#import <Foundation/Foundation.h>
@class UZKArchive;
/**
* Defines the various compression levels that can be applied to a file
*/
typedef NS_ENUM(NSInteger, UZKCompressionMethod) {
/**
* Default level
*/
UZKCompressionMethodDefault= -1,
/**
* No compression
*/
UZKCompressionMethodNone= 0,
/**
* Fastest compression
*/
UZKCompressionMethodFastest= 1,
/**
* Best (slowest) compression
*/
UZKCompressionMethodBest= 9
};
@interface UZKFileInfo : NSObject
/**
* The name of the file
*/
@property (readonly, strong) NSString *filename;
/**
* The timestamp of the file
*/
@property (readonly, nonatomic) NSDate *timestamp;
/**
* The CRC checksum of the file
*/
@property (readonly) NSUInteger CRC;
/**
* Size of the uncompressed file
*/
@property (readonly) unsigned long long int uncompressedSize;
/**
* Size of the compressed file
*/
@property (readonly) unsigned long long int compressedSize;
/**
* YES if the file will be continued of the next volume
*/
@property (readonly) BOOL isEncryptedWithPassword;
/**
* YES if the file is a directory
*/
@property (readonly) BOOL isDirectory;
/**
* The type of compression
*/
@property (readonly) UZKCompressionMethod compressionMethod;
/**
* The POSIX permissions of the file, like you would get by retrieving the `NSFilePosixPermissions`
* key from the attributes NSFileManager returns. Assign in octal form, like 0777 in Objective-C or
* 0o777 in Swift
*/
@property (nonatomic, readonly) short posixPermissions;
@end

View File

@ -0,0 +1,19 @@
//
// UnzipKit.h
// UnzipKit
//
// Created by Dov Frankel on 12/16/14.
// Copyright (c) 2014 Abbey Code. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for UnzipKit.
FOUNDATION_EXPORT double UnzipKitVersionNumber;
//! Project version string for UnzipKit.
FOUNDATION_EXPORT const unsigned char UnzipKitVersionString[];
#import "UZKArchive.h"
#import "UZKFileInfo.h"

View File

@ -0,0 +1,6 @@
framework module UnzipKit {
umbrella header "UnzipKit.h"
export *
module * { export * }
}

View File

@ -0,0 +1,23 @@
//
// UZKFileInfo_Private.h
// UnzipKit
//
//
@import Foundation;
#import "unzip.h"
@interface UZKFileInfo (Private)
/**
* Returns a UZKFileInfo instance for the given extended header data
*
* @param fileInfo The header data for a Zip file
* @param filename The archive that contains the file
*
* @return an instance of UZKFileInfo
*/
+ (instancetype) fileInfo:(unz_file_info64 *)fileInfo filename:(NSString *)filename;
@end

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17D47</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>UnzipKit</string>
<key>CFBundleIdentifier</key>
<string>com.abbey-code.UnzipKit</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>UnzipKit</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.9</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9E145</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>17E189</string>
<key>DTSDKName</key>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0930</string>
<key>DTXcodeBuild</key>
<string>9E145</string>
<key>NSHumanReadableCopyright</key>
<string>© 2017 Abbey Code. All rights reserved.</string>
</dict>
</plist>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17D47</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIdentifier</key>
<string>com.abbey-code.UnzipKitResources</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>UnzipKitResources</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.9</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9E145</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>17E189</string>
<key>DTSDKName</key>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0930</string>
<key>DTXcodeBuild</key>
<string>9E145</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019 Abbey Code. All rights reserved.</string>
</dict>
</plist>

BIN
Carthage/Build/Mac/UnzipKit.framework/Versions/A/UnzipKit generated vendored Executable file

Binary file not shown.

1
Carthage/Build/Mac/UnzipKit.framework/Versions/Current generated vendored Symbolic link
View File

@ -0,0 +1 @@
A

View File

@ -0,0 +1,771 @@
BCSymbolMap Version: 2.0
+[UZKArchive zipArchiveAtPath:]
+[UZKArchive zipArchiveAtURL:]
+[UZKArchive zipArchiveAtPath:password:]
+[UZKArchive zipArchiveAtURL:password:]
+[UZKArchive initialize]
___24+[UZKArchive initialize]_block_invoke
-[UZKArchive init]
-[UZKArchive initWithPath:error:]
-[UZKArchive initWithURL:error:]
-[UZKArchive initWithPath:password:error:]
-[UZKArchive initWithURL:password:error:]
-[UZKArchive initWithFile:error:]
-[UZKArchive initWithFile:password:error:]
-[UZKArchive fileURL]
-[UZKArchive filename]
-[UZKArchive comment]
-[UZKArchive setComment:]
+[UZKArchive pathIsAZip:]
+[UZKArchive urlIsAZip:]
-[UZKArchive listFilenames:]
-[UZKArchive listFileInfo:]
___27-[UZKArchive listFileInfo:]_block_invoke
___copy_helper_block_
___destroy_helper_block_
-[UZKArchive extractFilesTo:overwrite:error:]
-[UZKArchive extractFilesTo:overwrite:progress:error:]
___54-[UZKArchive extractFilesTo:overwrite:progress:error:]_block_invoke
___54-[UZKArchive extractFilesTo:overwrite:progress:error:]_block_invoke.170
___copy_helper_block_.173
___destroy_helper_block_.174
___copy_helper_block_.207
___destroy_helper_block_.208
-[UZKArchive extractData:error:]
-[UZKArchive extractData:progress:error:]
-[UZKArchive extractDataFromFile:error:]
-[UZKArchive extractDataFromFile:progress:error:]
___49-[UZKArchive extractDataFromFile:progress:error:]_block_invoke
___copy_helper_block_.219
___destroy_helper_block_.220
-[UZKArchive performOnFilesInArchive:error:]
___44-[UZKArchive performOnFilesInArchive:error:]_block_invoke
___copy_helper_block_.237
___destroy_helper_block_.238
-[UZKArchive performOnDataInArchive:error:]
___43-[UZKArchive performOnDataInArchive:error:]_block_invoke
___copy_helper_block_.248
___destroy_helper_block_.249
-[UZKArchive extractBufferedDataFromFile:error:action:]
___55-[UZKArchive extractBufferedDataFromFile:error:action:]_block_invoke
___copy_helper_block_.270
___destroy_helper_block_.271
-[UZKArchive isPasswordProtected]
-[UZKArchive validatePassword]
___30-[UZKArchive validatePassword]_block_invoke
-[UZKArchive checkDataIntegrity]
-[UZKArchive checkDataIntegrityOfFile:]
___39-[UZKArchive checkDataIntegrityOfFile:]_block_invoke
___copy_helper_block_.296
___destroy_helper_block_.297
-[UZKArchive writeData:filePath:error:]
-[UZKArchive writeData:filePath:progress:error:]
-[UZKArchive writeData:filePath:fileDate:error:]
-[UZKArchive writeData:filePath:fileDate:progress:error:]
-[UZKArchive writeData:filePath:fileDate:compressionMethod:password:error:]
-[UZKArchive writeData:filePath:fileDate:compressionMethod:password:progress:error:]
-[UZKArchive writeData:filePath:fileDate:compressionMethod:password:overwrite:error:]
-[UZKArchive writeData:filePath:fileDate:compressionMethod:password:overwrite:progress:error:]
-[UZKArchive writeData:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:error:]
-[UZKArchive writeData:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:progress:error:]
___111-[UZKArchive writeData:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:progress:error:]_block_invoke
___copy_helper_block_.318
___destroy_helper_block_.319
-[UZKArchive writeIntoBuffer:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:compressionMethod:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:compressionMethod:overwrite:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:compressionMethod:overwrite:CRC:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:compressionMethod:overwrite:CRC:password:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]
___109-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]_block_invoke
___109-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]_block_invoke.326
___copy_helper_block_.327
___destroy_helper_block_.328
___copy_helper_block_.337
___destroy_helper_block_.338
-[UZKArchive deleteFile:error:]
-[UZKArchive performActionWithArchiveOpen:inMode:error:]
-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]
___115-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]_block_invoke
___copy_helper_block_.414
___destroy_helper_block_.415
___115-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]_block_invoke.424
___copy_helper_block_.435
___destroy_helper_block_.436
-[UZKArchive openFile:inMode:withPassword:error:]
-[UZKArchive closeFile:inMode:]
-[UZKArchive currentFileInZipInfo:]
-[UZKArchive locateFileInZip:error:]
-[UZKArchive openFile:]
-[UZKArchive readFile:length:error:]
-[UZKArchive readGlobalComment]
___Block_byref_object_copy_
___Block_byref_object_dispose_
___31-[UZKArchive readGlobalComment]_block_invoke
___copy_helper_block_.522
___destroy_helper_block_.523
-[UZKArchive storeFileBookmark:error:]
+[UZKArchive figureOutCString:]
+[UZKArchive errorNameForErrorCode:]
+[UZKArchive zipFileInfoForDate:posixPermissions:]
-[UZKArchive assignError:code:detail:]
-[UZKArchive assignError:code:detail:underlyer:]
-[UZKArchive isDeflate64:]
-[UZKArchive beginProgressOperation:]
-[UZKArchive password]
-[UZKArchive setPassword:]
-[UZKArchive progress]
-[UZKArchive setProgress:]
-[UZKArchive fileBookmark]
-[UZKArchive setFileBookmark:]
-[UZKArchive fallbackURL]
-[UZKArchive setFallbackURL:]
-[UZKArchive openCount]
-[UZKArchive setOpenCount:]
-[UZKArchive mode]
-[UZKArchive setMode:]
-[UZKArchive zipFile]
-[UZKArchive setZipFile:]
-[UZKArchive unzFile]
-[UZKArchive setUnzFile:]
-[UZKArchive archiveContents]
-[UZKArchive setArchiveContents:]
-[UZKArchive threadLock]
-[UZKArchive setThreadLock:]
-[UZKArchive commentRetrieved]
-[UZKArchive setCommentRetrieved:]
-[UZKArchive .cxx_destruct]
__resources
_initialize.onceToken
___block_descriptor_tmp
___block_literal_global
LOS_LOG0
LOS_ACT1
LOS_LOG3
LOS_LOG4
LOS_LOG5
LOS_LOG6
LOS_LOG7
LOS_LOG8
LOS_LOG9
_OBJC_IVAR_$_UZKArchive._openCount
_OBJC_IVAR_$_UZKArchive._mode
_OBJC_IVAR_$_UZKArchive._fallbackURL
_OBJC_IVAR_$_UZKArchive._password
_OBJC_IVAR_$_UZKArchive._threadLock
_OBJC_IVAR_$_UZKArchive._commentRetrieved
LOS_ACT10
LOS_LOG12
LOS_LOG13
LOS_LOG14
LOS_LOG15
LOS_LOG16
LOS_LOG17
LOS_LOG18
LOS_LOG19
LOS_LOG20
LOS_ACT21
LOS_ACT23
LOS_LOG25
_OBJC_IVAR_$_UZKArchive._comment
LOS_ACT26
LOS_LOG28
LOS_LOG29
LOS_LOG30
LOS_ACT31
LOS_LOG33
LOS_LOG34
LOS_LOG35
LOS_LOG36
LOS_LOG37
LOS_LOG38
LOS_LOG39
LOS_LOG40
LOS_ACT41
LOS_LOG43
LOS_ACT44
LOS_LOG46
LOS_ACT47
LOS_LOG49
LOS_LOG50
LOS_ACT51
LOS_LOG53
LOS_LOG54
LOS_LOG55
LOS_LOG56
LOS_LOG57
LOS_LOG58
LOS_LOG59
LOS_LOG60
LOS_LOG61
LOS_LOG62
LOS_LOG63
LOS_LOG64
LOS_LOG65
LOS_LOG66
___block_descriptor_tmp.122
LOS_ACT67
LOS_LOG69
LOS_LOG70
LOS_LOG71
LOS_ACT72
LOS_LOG74
LOS_LOG75
LOS_LOG76
LOS_LOG77
LOS_LOG78
LOS_LOG79
LOS_LOG80
LOS_LOG81
LOS_LOG82
LOS_LOG83
LOS_LOG84
LOS_LOG85
LOS_LOG86
LOS_LOG87
LOS_LOG88
LOS_LOG89
LOS_LOG90
LOS_LOG91
LOS_LOG92
___block_descriptor_tmp.176
LOS_LOG93
LOS_LOG94
LOS_LOG95
LOS_LOG96
___block_descriptor_tmp.209
LOS_ACT97
LOS_LOG99
LOS_LOG100
___block_descriptor_tmp.221
LOS_LOG101
LOS_LOG102
LOS_LOG103
LOS_ACT104
LOS_LOG106
LOS_LOG107
LOS_LOG108
LOS_LOG109
LOS_ACT110
LOS_LOG112
LOS_LOG113
LOS_LOG114
___block_descriptor_tmp.239
LOS_LOG115
LOS_LOG116
LOS_ACT117
LOS_LOG119
LOS_LOG120
LOS_LOG121
LOS_LOG122
LOS_LOG123
LOS_LOG124
LOS_LOG125
___block_descriptor_tmp.251
LOS_ACT126
LOS_LOG128
LOS_LOG129
LOS_LOG130
LOS_LOG131
LOS_LOG132
LOS_LOG133
LOS_LOG134
LOS_LOG135
LOS_LOG136
LOS_LOG137
LOS_LOG138
LOS_LOG139
LOS_LOG140
LOS_LOG141
LOS_LOG142
LOS_LOG143
LOS_LOG144
LOS_LOG145
___block_descriptor_tmp.272
LOS_LOG146
LOS_LOG147
LOS_ACT148
LOS_LOG150
LOS_LOG151
LOS_LOG152
LOS_LOG153
LOS_ACT154
LOS_LOG156
LOS_LOG157
LOS_LOG158
LOS_LOG159
___block_descriptor_tmp.280
___block_literal_global.281
LOS_LOG160
LOS_LOG161
LOS_ACT162
LOS_LOG164
LOS_LOG165
LOS_LOG166
LOS_LOG167
___block_descriptor_tmp.299
LOS_LOG168
LOS_LOG169
LOS_ACT170
LOS_LOG172
LOS_LOG173
LOS_LOG174
LOS_ACT175
LOS_LOG177
LOS_LOG178
LOS_LOG179
LOS_LOG180
LOS_LOG181
___block_descriptor_tmp.321
LOS_ACT182
LOS_LOG184
LOS_ACT185
LOS_LOG187
LOS_LOG188
LOS_LOG189
LOS_LOG190
LOS_LOG191
___block_descriptor_tmp.330
LOS_LOG192
LOS_LOG193
___block_descriptor_tmp.339
LOS_ACT194
LOS_LOG196
LOS_LOG197
LOS_LOG198
LOS_LOG199
LOS_LOG200
LOS_LOG201
LOS_LOG202
LOS_LOG203
LOS_LOG204
LOS_LOG205
LOS_LOG206
LOS_LOG207
LOS_LOG208
LOS_LOG209
LOS_LOG210
LOS_LOG211
LOS_LOG212
LOS_LOG213
LOS_LOG214
LOS_LOG215
LOS_LOG216
LOS_LOG217
LOS_LOG218
LOS_LOG219
LOS_LOG220
LOS_LOG221
LOS_LOG222
LOS_LOG223
LOS_LOG224
LOS_LOG225
LOS_LOG226
LOS_LOG227
LOS_LOG228
LOS_LOG229
LOS_LOG230
LOS_LOG231
LOS_LOG232
LOS_LOG233
LOS_LOG234
LOS_LOG235
LOS_LOG236
LOS_LOG237
LOS_LOG238
LOS_LOG239
LOS_LOG240
LOS_LOG241
LOS_LOG242
LOS_LOG243
LOS_LOG244
LOS_LOG245
LOS_LOG246
LOS_LOG247
LOS_LOG248
LOS_LOG249
LOS_LOG250
LOS_LOG251
LOS_LOG252
LOS_LOG253
LOS_LOG254
LOS_LOG255
LOS_LOG256
LOS_LOG257
LOS_LOG258
LOS_LOG259
LOS_LOG260
LOS_LOG261
LOS_LOG262
LOS_LOG263
LOS_LOG264
LOS_LOG265
LOS_LOG266
LOS_LOG267
LOS_LOG268
LOS_LOG269
LOS_LOG270
LOS_LOG271
LOS_LOG272
LOS_LOG273
LOS_LOG274
LOS_LOG275
LOS_LOG276
LOS_LOG277
LOS_LOG278
LOS_LOG279
LOS_LOG280
LOS_LOG281
LOS_LOG282
LOS_LOG283
LOS_LOG284
LOS_LOG285
LOS_LOG286
LOS_LOG287
LOS_LOG288
LOS_LOG289
LOS_LOG290
LOS_LOG291
LOS_LOG292
LOS_LOG293
LOS_LOG294
LOS_LOG295
LOS_LOG296
LOS_LOG297
LOS_LOG298
LOS_ACT299
LOS_LOG301
LOS_LOG302
LOS_LOG303
LOS_ACT304
LOS_LOG306
LOS_LOG307
LOS_LOG308
___block_descriptor_tmp.417
LOS_LOG309
LOS_LOG310
LOS_LOG311
LOS_ACT312
LOS_LOG314
LOS_LOG315
LOS_LOG316
LOS_LOG317
LOS_LOG318
LOS_LOG319
LOS_LOG320
LOS_LOG321
LOS_LOG322
LOS_LOG323
LOS_LOG324
___block_descriptor_tmp.437
LOS_ACT325
LOS_LOG327
LOS_LOG328
LOS_LOG329
LOS_LOG330
LOS_LOG331
LOS_LOG332
LOS_LOG333
LOS_LOG334
LOS_LOG335
LOS_LOG336
LOS_LOG337
LOS_LOG338
LOS_LOG339
LOS_LOG340
LOS_LOG341
LOS_LOG342
LOS_LOG343
LOS_LOG344
LOS_LOG345
LOS_LOG346
LOS_LOG347
LOS_LOG348
LOS_LOG349
LOS_LOG350
LOS_LOG351
LOS_LOG352
LOS_LOG353
LOS_LOG354
LOS_ACT355
LOS_LOG357
LOS_LOG358
LOS_LOG359
LOS_LOG360
LOS_LOG361
LOS_LOG362
LOS_LOG363
LOS_LOG364
LOS_LOG365
LOS_LOG366
LOS_ACT367
LOS_LOG369
LOS_LOG370
LOS_LOG371
LOS_ACT372
LOS_LOG374
LOS_LOG375
LOS_LOG376
LOS_LOG377
LOS_LOG378
LOS_LOG379
LOS_LOG380
LOS_LOG381
LOS_ACT382
LOS_LOG384
LOS_LOG385
LOS_LOG386
LOS_LOG387
LOS_LOG388
LOS_LOG389
LOS_LOG390
LOS_LOG391
LOS_LOG392
LOS_ACT393
LOS_LOG395
LOS_LOG396
LOS_LOG397
LOS_LOG398
LOS_LOG399
LOS_ACT400
LOS_LOG402
LOS_LOG403
LOS_ACT404
LOS_LOG406
LOS_LOG407
LOS_LOG408
LOS_LOG409
LOS_LOG410
LOS_LOG411
LOS_LOG412
LOS_LOG413
LOS_LOG414
LOS_LOG415
LOS_LOG416
LOS_LOG417
LOS_LOG418
___block_descriptor_tmp.524
LOS_ACT419
LOS_LOG421
LOS_LOG422
LOS_LOG423
LOS_ACT424
LOS_LOG426
LOS_LOG427
LOS_LOG428
LOS_LOG429
LOS_ACT430
LOS_LOG432
LOS_ACT433
_OBJC_IVAR_$_UZKArchive._progress
_OBJC_IVAR_$_UZKArchive._fileBookmark
_OBJC_IVAR_$_UZKArchive._zipFile
_OBJC_IVAR_$_UZKArchive._unzFile
_OBJC_IVAR_$_UZKArchive._archiveContents
l_OBJC_PROTOCOL_$_NSObject
l_OBJC_LABEL_PROTOCOL_$_NSObject
l_OBJC_PROTOCOL_$_NSProgressReporting
l_OBJC_LABEL_PROTOCOL_$_NSProgressReporting
Apple LLVM version 9.1.0 (clang-902.0.39.1)
/Users/travis/build/abbeycode/UnzipKit/Source/UZKArchive.m
/Users/travis/build/abbeycode/UnzipKit
/Users/travis/build/abbeycode/UnzipKit/Source/UZKArchive.h
__os_log_helper_16_0_1_4_0
__os_log_helper_16_0_0
__os_log_helper_16_2_2_4_66_4_66
__destroy_helper_block_
__copy_helper_block_
__31-[UZKArchive readGlobalComment]_block_invoke
__os_log_helper_16_2_1_4_66
__Block_byref_object_dispose_
__Block_byref_object_copy_
__os_log_helper_16_0_2_4_0_4_0
__os_log_helper_16_2_2_4_0_4_66
__os_log_helper_16_2_2_4_34_4_34
__115-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]_block_invoke.424
__115-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]_block_invoke
__os_log_helper_16_2_1_4_34
__109-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]_block_invoke.326
__109-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]_block_invoke
__os_log_helper_16_2_7_4_66_4_0_4_0_4_66_4_0_4_66_4_66
__111-[UZKArchive writeData:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:progress:error:]_block_invoke
__os_log_helper_16_0_1_8_0
__os_log_helper_16_2_7_4_66_4_0_4_0_4_66_4_66_4_66_4_66
__39-[UZKArchive checkDataIntegrityOfFile:]_block_invoke
__os_log_helper_16_2_3_4_66_4_0_4_0
__30-[UZKArchive validatePassword]_block_invoke
__55-[UZKArchive extractBufferedDataFromFile:error:action:]_block_invoke
__43-[UZKArchive performOnDataInArchive:error:]_block_invoke
__44-[UZKArchive performOnFilesInArchive:error:]_block_invoke
__49-[UZKArchive extractDataFromFile:progress:error:]_block_invoke
__os_log_helper_16_0_2_4_0_8_0
__54-[UZKArchive extractFilesTo:overwrite:progress:error:]_block_invoke.170
__54-[UZKArchive extractFilesTo:overwrite:progress:error:]_block_invoke
__27-[UZKArchive listFileInfo:]_block_invoke
__os_log_helper_16_2_3_4_66_4_66_4_66
__24+[UZKArchive initialize]_block_invoke
__os_log_helper_16_2_1_4_64
/Applications/Xcode-9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/usr/include/dispatch/once.h
+[UZKFileInfo fileInfo:filename:]
-[UZKFileInfo initWithFileInfo:filename:]
-[UZKFileInfo timestamp]
-[UZKFileInfo readCompressionMethod:flag:]
-[UZKFileInfo readDate:]
-[UZKFileInfo filename]
-[UZKFileInfo CRC]
-[UZKFileInfo uncompressedSize]
-[UZKFileInfo compressedSize]
-[UZKFileInfo isEncryptedWithPassword]
-[UZKFileInfo isDirectory]
-[UZKFileInfo compressionMethod]
-[UZKFileInfo posixPermissions]
-[UZKFileInfo zipTMUDate]
-[UZKFileInfo setZipTMUDate:]
-[UZKFileInfo .cxx_destruct]
_OBJC_IVAR_$_UZKFileInfo._filename
_OBJC_IVAR_$_UZKFileInfo._uncompressedSize
_OBJC_IVAR_$_UZKFileInfo._compressedSize
_OBJC_IVAR_$_UZKFileInfo._zipTMUDate
_OBJC_IVAR_$_UZKFileInfo._CRC
_OBJC_IVAR_$_UZKFileInfo._isEncryptedWithPassword
_OBJC_IVAR_$_UZKFileInfo._isDirectory
_OBJC_IVAR_$_UZKFileInfo._compressionMethod
_OBJC_IVAR_$_UZKFileInfo._posixPermissions
_OBJC_IVAR_$_UZKFileInfo._timestamp
/Users/travis/build/abbeycode/UnzipKit/Source/UZKFileInfo.m
/Users/travis/build/abbeycode/UnzipKit/Source/UZKFileInfo.h
-[NSURL(UnzipKitExtensions) volumeName]
LOS_LOG1
/Users/travis/build/abbeycode/UnzipKit/Source/Extensions/NSURL+UnzipKitExtensions.m
_fopen_file_func
_fread_file_func
_fwrite_file_func
_ftell_file_func
_fseek_file_func
_fclose_file_func
_ferror_file_func
_fopen64_file_func
_ftell64_file_func
_fseek64_file_func
/Users/travis/build/abbeycode/UnzipKit/Lib/MiniZip/ioapi.c
fseek64_file_func
ftell64_file_func
fopen64_file_func
fill_fopen64_filefunc
ferror_file_func
fclose_file_func
fseek_file_func
ftell_file_func
fwrite_file_func
fread_file_func
fopen_file_func
fill_fopen_filefunc
fill_zlib_filefunc64_32_def_from_filefunc32
call_ztell64
call_zseek64
call_zopen64
_unzOpenInternal
_unz64local_GetCurrentFileInfoInternal
_unz64local_getLong
_unz64local_getLong64
_unz64local_getShort
/Users/travis/build/abbeycode/UnzipKit/Lib/MiniZip/unzip.c
unz64local_getShort
unz64local_getByte
unz64local_getLong64
unz64local_getLong
unzSetOffset
unzSetOffset64
unzGetOffset
unzGetOffset64
unzGetGlobalComment
unzGetLocalExtrafield
unzeof
unztell64
unztell
unzReadCurrentFile
update_keys
/Users/travis/build/abbeycode/UnzipKit/Lib/MiniZip/crypt.h
decrypt_byte
unzGetCurrentFileZStreamPos64
unzOpenCurrentFile2
unzOpenCurrentFilePassword
unzOpenCurrentFile
unzOpenCurrentFile3
init_keys
unz64local_CheckCurrentFileCoherencyHeader
unzGoToFilePos
unzGoToFilePos64
unzGetFilePos
unzGetFilePos64
unzLocateFile
unzGetCurrentFileInfo64
unzGoToFirstFile
unzGoToNextFile
unzGetCurrentFileInfo
unz64local_GetCurrentFileInfoInternal
unz64local_DosDateToTmuDate
unzGetGlobalInfo
unzGetGlobalInfo64
unzCloseCurrentFile
unzClose
unzOpen64
unzOpen
unzOpen2_64
unzOpenInternal
unz64local_SearchCentralDir
unz64local_SearchCentralDir64
unzOpen2
unzStringFileNameCompare
strcmpcasenosensitive_internal
_zip64local_getLong
_zip64local_getLong64
_zip64local_getShort
_add_data_in_datablock
_zip64FlushWriteBuffer
_init_keys
_update_keys
_crypthead.calls
/Users/travis/build/abbeycode/UnzipKit/Lib/MiniZip/zip.c
zipRemoveExtraInfoBlock
zipClose
free_linkedlist
free_datablock
zipCloseFileInZip
zipCloseFileInZipRaw
Write_GlobalComment
zip64local_putValue
Write_EndOfCentralDirectoryRecord
Write_Zip64EndOfCentralDirectoryRecord
Write_Zip64EndOfCentralDirectoryLocator
zipCloseFileInZipRaw64
zip64local_putValue_inmemory
zip64FlushWriteBuffer
zipWriteInFileInZip
zipOpenNewFileInZip
zipOpenNewFileInZip64
zipOpenNewFileInZip2_64
zipOpenNewFileInZip2
zipOpenNewFileInZip3_64
zipOpenNewFileInZip3
zipOpenNewFileInZip4
zipOpenNewFileInZip4_64
crypthead
zip64local_TmzDateToDosDate
Write_LocalFileHeader
zipOpen64
zipOpen
zipOpen2_64
zipOpen2
zipOpen3
init_linkedlist
add_data_in_datablock
allocate_new_datablock
zip64local_getShort
zip64local_getByte
zip64local_getLong64
zip64local_getLong
LoadCentralDirectoryRecord
zip64local_SearchCentralDir
zip64local_SearchCentralDir64

View File

@ -0,0 +1,772 @@
BCSymbolMap Version: 2.0
+[UZKArchive zipArchiveAtPath:]
+[UZKArchive zipArchiveAtURL:]
+[UZKArchive zipArchiveAtPath:password:]
+[UZKArchive zipArchiveAtURL:password:]
+[UZKArchive initialize]
___24+[UZKArchive initialize]_block_invoke
-[UZKArchive init]
-[UZKArchive initWithPath:error:]
-[UZKArchive initWithURL:error:]
-[UZKArchive initWithPath:password:error:]
-[UZKArchive initWithURL:password:error:]
-[UZKArchive initWithFile:error:]
-[UZKArchive initWithFile:password:error:]
-[UZKArchive fileURL]
-[UZKArchive filename]
-[UZKArchive comment]
-[UZKArchive setComment:]
+[UZKArchive pathIsAZip:]
+[UZKArchive urlIsAZip:]
-[UZKArchive listFilenames:]
-[UZKArchive listFileInfo:]
___27-[UZKArchive listFileInfo:]_block_invoke
___copy_helper_block_
___destroy_helper_block_
-[UZKArchive extractFilesTo:overwrite:error:]
-[UZKArchive extractFilesTo:overwrite:progress:error:]
___54-[UZKArchive extractFilesTo:overwrite:progress:error:]_block_invoke
___54-[UZKArchive extractFilesTo:overwrite:progress:error:]_block_invoke.170
___copy_helper_block_.173
___destroy_helper_block_.174
___copy_helper_block_.207
___destroy_helper_block_.208
-[UZKArchive extractData:error:]
-[UZKArchive extractData:progress:error:]
-[UZKArchive extractDataFromFile:error:]
-[UZKArchive extractDataFromFile:progress:error:]
___49-[UZKArchive extractDataFromFile:progress:error:]_block_invoke
___copy_helper_block_.219
___destroy_helper_block_.220
-[UZKArchive performOnFilesInArchive:error:]
___44-[UZKArchive performOnFilesInArchive:error:]_block_invoke
___copy_helper_block_.237
___destroy_helper_block_.238
-[UZKArchive performOnDataInArchive:error:]
___43-[UZKArchive performOnDataInArchive:error:]_block_invoke
___copy_helper_block_.248
___destroy_helper_block_.249
-[UZKArchive extractBufferedDataFromFile:error:action:]
___55-[UZKArchive extractBufferedDataFromFile:error:action:]_block_invoke
___copy_helper_block_.270
___destroy_helper_block_.271
-[UZKArchive isPasswordProtected]
-[UZKArchive validatePassword]
___30-[UZKArchive validatePassword]_block_invoke
-[UZKArchive checkDataIntegrity]
-[UZKArchive checkDataIntegrityOfFile:]
___39-[UZKArchive checkDataIntegrityOfFile:]_block_invoke
___copy_helper_block_.296
___destroy_helper_block_.297
-[UZKArchive writeData:filePath:error:]
-[UZKArchive writeData:filePath:progress:error:]
-[UZKArchive writeData:filePath:fileDate:error:]
-[UZKArchive writeData:filePath:fileDate:progress:error:]
-[UZKArchive writeData:filePath:fileDate:compressionMethod:password:error:]
-[UZKArchive writeData:filePath:fileDate:compressionMethod:password:progress:error:]
-[UZKArchive writeData:filePath:fileDate:compressionMethod:password:overwrite:error:]
-[UZKArchive writeData:filePath:fileDate:compressionMethod:password:overwrite:progress:error:]
-[UZKArchive writeData:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:error:]
-[UZKArchive writeData:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:progress:error:]
___111-[UZKArchive writeData:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:progress:error:]_block_invoke
___copy_helper_block_.318
___destroy_helper_block_.319
-[UZKArchive writeIntoBuffer:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:compressionMethod:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:compressionMethod:overwrite:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:compressionMethod:overwrite:CRC:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:compressionMethod:overwrite:CRC:password:error:block:]
-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]
___109-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]_block_invoke
___109-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]_block_invoke.326
___copy_helper_block_.327
___destroy_helper_block_.328
___copy_helper_block_.337
___destroy_helper_block_.338
-[UZKArchive deleteFile:error:]
-[UZKArchive performActionWithArchiveOpen:inMode:error:]
-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]
___115-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]_block_invoke
___copy_helper_block_.414
___destroy_helper_block_.415
___115-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]_block_invoke.424
___copy_helper_block_.435
___destroy_helper_block_.436
-[UZKArchive openFile:inMode:withPassword:error:]
-[UZKArchive closeFile:inMode:]
-[UZKArchive currentFileInZipInfo:]
-[UZKArchive locateFileInZip:error:]
-[UZKArchive openFile:]
-[UZKArchive readFile:length:error:]
-[UZKArchive readGlobalComment]
___Block_byref_object_copy_
___Block_byref_object_dispose_
___31-[UZKArchive readGlobalComment]_block_invoke
___copy_helper_block_.522
___destroy_helper_block_.523
-[UZKArchive storeFileBookmark:error:]
+[UZKArchive figureOutCString:]
+[UZKArchive errorNameForErrorCode:]
+[UZKArchive zipFileInfoForDate:posixPermissions:]
-[UZKArchive assignError:code:detail:]
-[UZKArchive assignError:code:detail:underlyer:]
-[UZKArchive isDeflate64:]
-[UZKArchive beginProgressOperation:]
-[UZKArchive password]
-[UZKArchive setPassword:]
-[UZKArchive progress]
-[UZKArchive setProgress:]
-[UZKArchive fileBookmark]
-[UZKArchive setFileBookmark:]
-[UZKArchive fallbackURL]
-[UZKArchive setFallbackURL:]
-[UZKArchive openCount]
-[UZKArchive setOpenCount:]
-[UZKArchive mode]
-[UZKArchive setMode:]
-[UZKArchive zipFile]
-[UZKArchive setZipFile:]
-[UZKArchive unzFile]
-[UZKArchive setUnzFile:]
-[UZKArchive archiveContents]
-[UZKArchive setArchiveContents:]
-[UZKArchive threadLock]
-[UZKArchive setThreadLock:]
-[UZKArchive commentRetrieved]
-[UZKArchive setCommentRetrieved:]
-[UZKArchive .cxx_destruct]
__resources
_initialize.onceToken
___block_descriptor_tmp
___block_literal_global
LOS_LOG0
LOS_ACT1
LOS_LOG3
LOS_LOG4
LOS_LOG5
LOS_LOG6
LOS_LOG7
LOS_LOG8
LOS_LOG9
_OBJC_IVAR_$_UZKArchive._openCount
_OBJC_IVAR_$_UZKArchive._mode
_OBJC_IVAR_$_UZKArchive._fallbackURL
_OBJC_IVAR_$_UZKArchive._password
_OBJC_IVAR_$_UZKArchive._threadLock
_OBJC_IVAR_$_UZKArchive._commentRetrieved
LOS_ACT10
LOS_LOG12
LOS_LOG13
LOS_LOG14
LOS_LOG15
LOS_LOG16
LOS_LOG17
LOS_LOG18
LOS_LOG19
LOS_LOG20
LOS_ACT21
LOS_ACT23
LOS_LOG25
_OBJC_IVAR_$_UZKArchive._comment
LOS_ACT26
LOS_LOG28
LOS_LOG29
LOS_LOG30
LOS_ACT31
LOS_LOG33
LOS_LOG34
LOS_LOG35
LOS_LOG36
LOS_LOG37
LOS_LOG38
LOS_LOG39
LOS_LOG40
LOS_ACT41
LOS_LOG43
LOS_ACT44
LOS_LOG46
LOS_ACT47
LOS_LOG49
LOS_LOG50
LOS_ACT51
LOS_LOG53
LOS_LOG54
LOS_LOG55
LOS_LOG56
LOS_LOG57
LOS_LOG58
LOS_LOG59
LOS_LOG60
LOS_LOG61
LOS_LOG62
LOS_LOG63
LOS_LOG64
LOS_LOG65
LOS_LOG66
___block_descriptor_tmp.122
LOS_ACT67
LOS_LOG69
LOS_LOG70
LOS_LOG71
LOS_ACT72
LOS_LOG74
LOS_LOG75
LOS_LOG76
LOS_LOG77
LOS_LOG78
LOS_LOG79
LOS_LOG80
LOS_LOG81
LOS_LOG82
LOS_LOG83
LOS_LOG84
LOS_LOG85
LOS_LOG86
LOS_LOG87
LOS_LOG88
LOS_LOG89
LOS_LOG90
LOS_LOG91
LOS_LOG92
___block_descriptor_tmp.176
LOS_LOG93
LOS_LOG94
LOS_LOG95
LOS_LOG96
___block_descriptor_tmp.209
LOS_ACT97
LOS_LOG99
LOS_LOG100
___block_descriptor_tmp.221
LOS_LOG101
LOS_LOG102
LOS_LOG103
LOS_ACT104
LOS_LOG106
LOS_LOG107
LOS_LOG108
LOS_LOG109
LOS_ACT110
LOS_LOG112
LOS_LOG113
LOS_LOG114
___block_descriptor_tmp.239
LOS_LOG115
LOS_LOG116
LOS_ACT117
LOS_LOG119
LOS_LOG120
LOS_LOG121
LOS_LOG122
LOS_LOG123
LOS_LOG124
LOS_LOG125
___block_descriptor_tmp.251
LOS_ACT126
LOS_LOG128
LOS_LOG129
LOS_LOG130
LOS_LOG131
LOS_LOG132
LOS_LOG133
LOS_LOG134
LOS_LOG135
LOS_LOG136
LOS_LOG137
LOS_LOG138
LOS_LOG139
LOS_LOG140
LOS_LOG141
LOS_LOG142
LOS_LOG143
LOS_LOG144
LOS_LOG145
___block_descriptor_tmp.272
LOS_LOG146
LOS_LOG147
LOS_ACT148
LOS_LOG150
LOS_LOG151
LOS_LOG152
LOS_LOG153
LOS_ACT154
LOS_LOG156
LOS_LOG157
LOS_LOG158
LOS_LOG159
___block_descriptor_tmp.280
___block_literal_global.281
LOS_LOG160
LOS_LOG161
LOS_ACT162
LOS_LOG164
LOS_LOG165
LOS_LOG166
LOS_LOG167
___block_descriptor_tmp.299
LOS_LOG168
LOS_LOG169
LOS_ACT170
LOS_LOG172
LOS_LOG173
LOS_LOG174
LOS_ACT175
LOS_LOG177
LOS_LOG178
LOS_LOG179
LOS_LOG180
LOS_LOG181
___block_descriptor_tmp.321
LOS_ACT182
LOS_LOG184
LOS_ACT185
LOS_LOG187
LOS_LOG188
LOS_LOG189
LOS_LOG190
LOS_LOG191
___block_descriptor_tmp.330
LOS_LOG192
LOS_LOG193
___block_descriptor_tmp.339
LOS_ACT194
LOS_LOG196
LOS_LOG197
LOS_LOG198
LOS_LOG199
LOS_LOG200
LOS_LOG201
LOS_LOG202
LOS_LOG203
LOS_LOG204
LOS_LOG205
LOS_LOG206
LOS_LOG207
LOS_LOG208
LOS_LOG209
LOS_LOG210
LOS_LOG211
LOS_LOG212
LOS_LOG213
LOS_LOG214
LOS_LOG215
LOS_LOG216
LOS_LOG217
LOS_LOG218
LOS_LOG219
LOS_LOG220
LOS_LOG221
LOS_LOG222
LOS_LOG223
LOS_LOG224
LOS_LOG225
LOS_LOG226
LOS_LOG227
LOS_LOG228
LOS_LOG229
LOS_LOG230
LOS_LOG231
LOS_LOG232
LOS_LOG233
LOS_LOG234
LOS_LOG235
LOS_LOG236
LOS_LOG237
LOS_LOG238
LOS_LOG239
LOS_LOG240
LOS_LOG241
LOS_LOG242
LOS_LOG243
LOS_LOG244
LOS_LOG245
LOS_LOG246
LOS_LOG247
LOS_LOG248
LOS_LOG249
LOS_LOG250
LOS_LOG251
LOS_LOG252
LOS_LOG253
LOS_LOG254
LOS_LOG255
LOS_LOG256
LOS_LOG257
LOS_LOG258
LOS_LOG259
LOS_LOG260
LOS_LOG261
LOS_LOG262
LOS_LOG263
LOS_LOG264
LOS_LOG265
LOS_LOG266
LOS_LOG267
LOS_LOG268
LOS_LOG269
LOS_LOG270
LOS_LOG271
LOS_LOG272
LOS_LOG273
LOS_LOG274
LOS_LOG275
LOS_LOG276
LOS_LOG277
LOS_LOG278
LOS_LOG279
LOS_LOG280
LOS_LOG281
LOS_LOG282
LOS_LOG283
LOS_LOG284
LOS_LOG285
LOS_LOG286
LOS_LOG287
LOS_LOG288
LOS_LOG289
LOS_LOG290
LOS_LOG291
LOS_LOG292
LOS_LOG293
LOS_LOG294
LOS_LOG295
LOS_LOG296
LOS_LOG297
LOS_LOG298
LOS_ACT299
LOS_LOG301
LOS_LOG302
LOS_LOG303
LOS_ACT304
LOS_LOG306
LOS_LOG307
LOS_LOG308
___block_descriptor_tmp.417
LOS_LOG309
LOS_LOG310
LOS_LOG311
LOS_ACT312
LOS_LOG314
LOS_LOG315
LOS_LOG316
LOS_LOG317
LOS_LOG318
LOS_LOG319
LOS_LOG320
LOS_LOG321
LOS_LOG322
LOS_LOG323
LOS_LOG324
___block_descriptor_tmp.437
LOS_ACT325
LOS_LOG327
LOS_LOG328
LOS_LOG329
LOS_LOG330
LOS_LOG331
LOS_LOG332
LOS_LOG333
LOS_LOG334
LOS_LOG335
LOS_LOG336
LOS_LOG337
LOS_LOG338
LOS_LOG339
LOS_LOG340
LOS_LOG341
LOS_LOG342
LOS_LOG343
LOS_LOG344
LOS_LOG345
LOS_LOG346
LOS_LOG347
LOS_LOG348
LOS_LOG349
LOS_LOG350
LOS_LOG351
LOS_LOG352
LOS_LOG353
LOS_LOG354
LOS_ACT355
LOS_LOG357
LOS_LOG358
LOS_LOG359
LOS_LOG360
LOS_LOG361
LOS_LOG362
LOS_LOG363
LOS_LOG364
LOS_LOG365
LOS_LOG366
LOS_ACT367
LOS_LOG369
LOS_LOG370
LOS_LOG371
LOS_ACT372
LOS_LOG374
LOS_LOG375
LOS_LOG376
LOS_LOG377
LOS_LOG378
LOS_LOG379
LOS_LOG380
LOS_LOG381
LOS_ACT382
LOS_LOG384
LOS_LOG385
LOS_LOG386
LOS_LOG387
LOS_LOG388
LOS_LOG389
LOS_LOG390
LOS_LOG391
LOS_LOG392
LOS_ACT393
LOS_LOG395
LOS_LOG396
LOS_LOG397
LOS_LOG398
LOS_LOG399
LOS_ACT400
LOS_LOG402
LOS_LOG403
LOS_ACT404
LOS_LOG406
LOS_LOG407
LOS_LOG408
LOS_LOG409
LOS_LOG410
LOS_LOG411
LOS_LOG412
LOS_LOG413
LOS_LOG414
LOS_LOG415
LOS_LOG416
LOS_LOG417
LOS_LOG418
___block_descriptor_tmp.524
LOS_ACT419
LOS_LOG421
LOS_LOG422
LOS_LOG423
LOS_ACT424
LOS_LOG426
LOS_LOG427
LOS_LOG428
LOS_LOG429
LOS_ACT430
LOS_LOG432
LOS_ACT433
_OBJC_IVAR_$_UZKArchive._progress
_OBJC_IVAR_$_UZKArchive._fileBookmark
_OBJC_IVAR_$_UZKArchive._zipFile
_OBJC_IVAR_$_UZKArchive._unzFile
_OBJC_IVAR_$_UZKArchive._archiveContents
l_OBJC_PROTOCOL_$_NSObject
l_OBJC_LABEL_PROTOCOL_$_NSObject
l_OBJC_PROTOCOL_$_NSProgressReporting
l_OBJC_LABEL_PROTOCOL_$_NSProgressReporting
Apple LLVM version 9.1.0 (clang-902.0.39.1)
/Users/travis/build/abbeycode/UnzipKit/Source/UZKArchive.m
/Users/travis/build/abbeycode/UnzipKit
/Users/travis/build/abbeycode/UnzipKit/Source/UZKArchive.h
__os_log_helper_16_0_1_8_0
__os_log_helper_16_0_0
__os_log_helper_16_2_2_8_66_8_66
__destroy_helper_block_
__copy_helper_block_
__31-[UZKArchive readGlobalComment]_block_invoke
__os_log_helper_16_2_1_8_66
__Block_byref_object_dispose_
__Block_byref_object_copy_
__os_log_helper_16_0_2_4_0_4_0
__os_log_helper_16_2_2_4_0_8_66
__os_log_helper_16_2_2_8_34_8_34
__os_log_helper_16_0_2_8_0_8_0
__115-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]_block_invoke.424
__115-[UZKArchive performWriteAction:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:CRC:error:]_block_invoke
__os_log_helper_16_2_1_8_34
__109-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]_block_invoke.326
__os_log_helper_16_0_1_4_0
__109-[UZKArchive writeIntoBuffer:fileDate:posixPermissions:compressionMethod:overwrite:CRC:password:error:block:]_block_invoke
__os_log_helper_16_2_7_8_66_8_0_8_0_8_66_8_0_8_66_8_66
__111-[UZKArchive writeData:filePath:fileDate:posixPermissions:compressionMethod:password:overwrite:progress:error:]_block_invoke
__os_log_helper_16_2_7_8_66_8_0_8_0_8_66_8_66_8_66_8_66
__39-[UZKArchive checkDataIntegrityOfFile:]_block_invoke
__os_log_helper_16_2_3_8_66_8_0_8_0
__30-[UZKArchive validatePassword]_block_invoke
__55-[UZKArchive extractBufferedDataFromFile:error:action:]_block_invoke
__43-[UZKArchive performOnDataInArchive:error:]_block_invoke
__44-[UZKArchive performOnFilesInArchive:error:]_block_invoke
__49-[UZKArchive extractDataFromFile:progress:error:]_block_invoke
__os_log_helper_16_2_2_8_0_8_66
__54-[UZKArchive extractFilesTo:overwrite:progress:error:]_block_invoke.170
__54-[UZKArchive extractFilesTo:overwrite:progress:error:]_block_invoke
__27-[UZKArchive listFileInfo:]_block_invoke
__os_log_helper_16_2_3_8_66_8_66_8_66
__24+[UZKArchive initialize]_block_invoke
__os_log_helper_16_2_1_8_64
/Applications/Xcode-9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/usr/include/dispatch/once.h
+[UZKFileInfo fileInfo:filename:]
-[UZKFileInfo initWithFileInfo:filename:]
-[UZKFileInfo timestamp]
-[UZKFileInfo readCompressionMethod:flag:]
-[UZKFileInfo readDate:]
-[UZKFileInfo filename]
-[UZKFileInfo CRC]
-[UZKFileInfo uncompressedSize]
-[UZKFileInfo compressedSize]
-[UZKFileInfo isEncryptedWithPassword]
-[UZKFileInfo isDirectory]
-[UZKFileInfo compressionMethod]
-[UZKFileInfo posixPermissions]
-[UZKFileInfo zipTMUDate]
-[UZKFileInfo setZipTMUDate:]
-[UZKFileInfo .cxx_destruct]
_OBJC_IVAR_$_UZKFileInfo._filename
_OBJC_IVAR_$_UZKFileInfo._uncompressedSize
_OBJC_IVAR_$_UZKFileInfo._compressedSize
_OBJC_IVAR_$_UZKFileInfo._zipTMUDate
_OBJC_IVAR_$_UZKFileInfo._CRC
_OBJC_IVAR_$_UZKFileInfo._isEncryptedWithPassword
_OBJC_IVAR_$_UZKFileInfo._isDirectory
_OBJC_IVAR_$_UZKFileInfo._compressionMethod
_OBJC_IVAR_$_UZKFileInfo._posixPermissions
_OBJC_IVAR_$_UZKFileInfo._timestamp
/Users/travis/build/abbeycode/UnzipKit/Source/UZKFileInfo.m
/Users/travis/build/abbeycode/UnzipKit/Source/UZKFileInfo.h
-[NSURL(UnzipKitExtensions) volumeName]
LOS_LOG1
/Users/travis/build/abbeycode/UnzipKit/Source/Extensions/NSURL+UnzipKitExtensions.m
_fopen_file_func
_fread_file_func
_fwrite_file_func
_ftell_file_func
_fseek_file_func
_fclose_file_func
_ferror_file_func
_fopen64_file_func
_ftell64_file_func
_fseek64_file_func
/Users/travis/build/abbeycode/UnzipKit/Lib/MiniZip/ioapi.c
fseek64_file_func
ftell64_file_func
fopen64_file_func
fill_fopen64_filefunc
ferror_file_func
fclose_file_func
fseek_file_func
ftell_file_func
fwrite_file_func
fread_file_func
fopen_file_func
fill_fopen_filefunc
fill_zlib_filefunc64_32_def_from_filefunc32
call_ztell64
call_zseek64
call_zopen64
_unzOpenInternal
_unz64local_GetCurrentFileInfoInternal
_unz64local_getLong
_unz64local_getLong64
_unz64local_getShort
/Users/travis/build/abbeycode/UnzipKit/Lib/MiniZip/unzip.c
unz64local_getShort
unz64local_getByte
unz64local_getLong64
unz64local_getLong
unzSetOffset
unzSetOffset64
unzGetOffset
unzGetOffset64
unzGetGlobalComment
unzGetLocalExtrafield
unzeof
unztell64
unztell
unzReadCurrentFile
update_keys
/Users/travis/build/abbeycode/UnzipKit/Lib/MiniZip/crypt.h
decrypt_byte
unzGetCurrentFileZStreamPos64
unzOpenCurrentFile2
unzOpenCurrentFilePassword
unzOpenCurrentFile
unzOpenCurrentFile3
init_keys
unz64local_CheckCurrentFileCoherencyHeader
unzGoToFilePos
unzGoToFilePos64
unzGetFilePos
unzGetFilePos64
unzLocateFile
unzGetCurrentFileInfo64
unzGoToFirstFile
unzGoToNextFile
unzGetCurrentFileInfo
unz64local_GetCurrentFileInfoInternal
unz64local_DosDateToTmuDate
unzGetGlobalInfo
unzGetGlobalInfo64
unzCloseCurrentFile
unzClose
unzOpen64
unzOpen
unzOpen2_64
unzOpenInternal
unz64local_SearchCentralDir
unz64local_SearchCentralDir64
unzOpen2
unzStringFileNameCompare
strcmpcasenosensitive_internal
_zip64local_getLong
_zip64local_getLong64
_zip64local_getShort
_add_data_in_datablock
_zip64FlushWriteBuffer
_init_keys
_update_keys
_crypthead.calls
/Users/travis/build/abbeycode/UnzipKit/Lib/MiniZip/zip.c
zipRemoveExtraInfoBlock
zipClose
free_linkedlist
free_datablock
zipCloseFileInZip
zipCloseFileInZipRaw
Write_GlobalComment
zip64local_putValue
Write_EndOfCentralDirectoryRecord
Write_Zip64EndOfCentralDirectoryRecord
Write_Zip64EndOfCentralDirectoryLocator
zipCloseFileInZipRaw64
zip64local_putValue_inmemory
zip64FlushWriteBuffer
zipWriteInFileInZip
zipOpenNewFileInZip
zipOpenNewFileInZip64
zipOpenNewFileInZip2_64
zipOpenNewFileInZip2
zipOpenNewFileInZip3_64
zipOpenNewFileInZip3
zipOpenNewFileInZip4
zipOpenNewFileInZip4_64
crypthead
zip64local_TmzDateToDosDate
Write_LocalFileHeader
zipOpen64
zipOpen
zipOpen2_64
zipOpen2
zipOpen3
init_linkedlist
add_data_in_datablock
allocate_new_datablock
zip64local_getShort
zip64local_getByte
zip64local_getLong64
zip64local_getLong
LoadCentralDirectoryRecord
zip64local_SearchCentralDir
zip64local_SearchCentralDir64

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.com.abbey-code.UnrarKit</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>2.9</string>
<key>CFBundleVersion</key>
<string>2.9</string>
</dict>
</plist>

Binary file not shown.

View File

@ -0,0 +1,496 @@
//
// URKArchive.h
// UnrarKit
//
//
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
#import "UnrarKitMacros.h"
RarosHppIgnore
#import "raros.hpp"
#pragma clang diagnostic pop
DllHppIgnore
#import "dll.hpp"
#pragma clang diagnostic pop
@class URKFileInfo;
/**
* Defines the various error codes that the listing and extraction methods return.
* These are returned in NSError's [code]([NSError code]) field.
*/
typedef NS_ENUM(NSInteger, URKErrorCode) {
/**
* The archive's header is empty
*/
URKErrorCodeEndOfArchive = ERAR_END_ARCHIVE,
/**
* The library ran out of memory while reading the archive
*/
URKErrorCodeNoMemory = ERAR_NO_MEMORY,
/**
* The header is broken
*/
URKErrorCodeBadData = ERAR_BAD_DATA,
/**
* The archive is not a valid RAR file
*/
URKErrorCodeBadArchive = ERAR_BAD_ARCHIVE,
/**
* The archive is an unsupported RAR format or version
*/
URKErrorCodeUnknownFormat = ERAR_UNKNOWN_FORMAT,
/**
* Failed to open a reference to the file
*/
URKErrorCodeOpen = ERAR_EOPEN,
/**
* Failed to create the target directory for extraction
*/
URKErrorCodeCreate = ERAR_ECREATE,
/**
* Failed to close the archive
*/
URKErrorCodeClose = ERAR_ECLOSE,
/**
* Failed to read the archive
*/
URKErrorCodeRead = ERAR_EREAD,
/**
* Failed to write a file to disk
*/
URKErrorCodeWrite = ERAR_EWRITE,
/**
* The archive header's comments are larger than the buffer size
*/
URKErrorCodeSmall = ERAR_SMALL_BUF,
/**
* The cause of the error is unspecified
*/
URKErrorCodeUnknown = ERAR_UNKNOWN,
/**
* A password was not given for a password-protected archive
*/
URKErrorCodeMissingPassword = ERAR_MISSING_PASSWORD,
/**
* No data was returned from the archive
*/
URKErrorCodeArchiveNotFound = 101,
/**
* User cancelled the operation
*/
URKErrorCodeUserCancelled = 102,
/**
* Error converting string to UTF-8
*/
URKErrorCodeStringConversion = 103,
};
typedef NSString *const URKProgressInfoKey;
/**
* Defines the keys passed in `-[NSProgress userInfo]` for certain methods
*/
static URKProgressInfoKey _Nonnull
/**
* For `extractFilesTo:overwrite:error:`, this key contains an instance of URKFileInfo with the file currently being extracted
*/
URKProgressInfoKeyFileInfoExtracting = @"URKProgressInfoKeyFileInfoExtracting";
NS_ASSUME_NONNULL_BEGIN
extern NSString *URKErrorDomain;
/**
* An Objective-C/Cocoa wrapper around the unrar library
*/
@interface URKArchive : NSObject
// Minimum of iOS 9, macOS 10.11 SDKs
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED > 90000) || (defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
<NSProgressReporting>
#endif
/**
* The URL of the archive
*/
@property(nullable, weak, atomic, readonly) NSURL *fileURL;
/**
* The filename of the archive
*/
@property(nullable, weak, atomic, readonly) NSString *filename;
/**
* The password of the archive
*/
@property(nullable, nonatomic, strong) NSString *password;
/**
* The total uncompressed size (in bytes) of all files in the archive. Returns nil on errors
*/
@property(nullable, atomic, readonly) NSNumber *uncompressedSize;
/**
* The total compressed size (in bytes) of the archive. Returns nil on errors
*/
@property(nullable, atomic, readonly) NSNumber *compressedSize;
/**
* True if the file is one volume of a multi-part archive
*/
@property(atomic, readonly) BOOL hasMultipleVolumes;
/**
* Can be used for progress reporting, but it's not necessary. You can also use
* implicit progress reporting. If you don't use it, one will still be created,
* which will become a child progress of whichever one is the current NSProgress
* instance.
*
* To use this, assign it before beginning an operation that reports progress. Once
* the method you're calling has a reference to it, it will nil it out. Please check
* for nil before assigning it to avoid concurrency conflicts.
*/
@property(nullable, strong) NSProgress *progress;
/**
* **DEPRECATED:** Creates and returns an archive at the given path
*
* @param filePath A path to the archive file
*/
+ (nullable instancetype)rarArchiveAtPath:(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
*/
+ (nullable instancetype)rarArchiveAtURL:(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 passowrd of the given archive
*/
+ (nullable instancetype)rarArchiveAtPath:(NSString *)filePath password:(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 passowrd of the given archive
*/
+ (nullable instancetype)rarArchiveAtURL:(NSURL *)fileURL password:(NSString *)password __deprecated_msg("Use -initWithURL:password:error: instead");
/**
* Do not use the default initializer
*/
- (instancetype)init NS_UNAVAILABLE;
/**
* Creates and returns an archive at the given path
*
* @param filePath A path to the archive file
* @param error Contains any error during initialization
*
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the path
*/
- (nullable instancetype)initWithPath:(NSString *)filePath error:(NSError **)error;
/**
* Creates and returns an archive at the given URL
*
* @param fileURL The URL of the archive file
* @param error Contains any error during initialization
*
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the URL
*/
- (nullable instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
/**
* Creates and returns an archive at the given path, with a given password
*
* @param filePath A path to the archive file
* @param password The passowrd of the given archive
* @param error Contains any error during initialization
*
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the path
*/
- (nullable instancetype)initWithPath:(NSString *)filePath password:(NSString *)password error:(NSError **)error;
/**
* Creates and returns an archive at the given URL, with a given password
*
* @param fileURL The URL of the archive file
* @param password The passowrd of the given archive
* @param error Contains any error during initialization
*
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the URL
*/
- (nullable instancetype)initWithURL:(NSURL *)fileURL password:(NSString *)password error:(NSError **)error;
/**
* Determines whether a file is a RAR archive by reading the signature
*
* @param filePath Path to the file being checked
*
* @return YES if the file exists and contains a signature indicating it is a RAR archive
*/
+ (BOOL)pathIsARAR:(NSString *)filePath;
/**
* Determines whether a file is a RAR archive by reading the signature
*
* @param fileURL URL of the file being checked
*
* @return YES if the file exists and contains a signature indicating it is a RAR archive
*/
+ (BOOL)urlIsARAR:(NSURL *)fileURL;
/**
* Lists the names of the files in the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of NSString containing the paths within the archive's contents, or nil if an error was encountered
*/
- (nullable NSArray<NSString*> *)listFilenames:(NSError **)error;
/**
* Lists the various attributes of each file in the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of URKFileInfo objects, which contain metadata about the archive's files, or nil if an error was encountered
*/
- (nullable NSArray<URKFileInfo*> *)listFileInfo:(NSError **)error;
/**
* Iterates the header of the archive, calling the block with each archived file's info.
*
* WARNING: There is no filtering of duplicate header entries. If a file is listed twice, `action`
* will be called twice with that file's path
*
* @param action The action to perform using the data. Must be non-nil
*
* - *fileInfo* The metadata of the file within the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns NO if an error was encountered
*/
- (BOOL) iterateFileInfo:(void(^)(URKFileInfo *fileInfo, BOOL *stop))action
error:(NSError **)error;
/**
* Lists the URLs of volumes in a single- or multi-volume archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns the list of URLs of all volumes of the archive
*/
- (nullable NSArray<NSURL*> *)listVolumeURLs:(NSError **)error;
/**
* Writes all files in the archive to the given path. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction. Use the progress property (as explained in the README) to
* retrieve more detailed information, such as the current file being extracted, number of files extracted,
* and the URKFileInfo instance being extracted
*
* @param filePath The destination path of the unarchived files
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
* @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 *)filePath
overwrite:(BOOL)overwrite
error:(NSError **)error;
/**
* **DEPRECATED:** Writes all files in the archive to the given path
*
* @param filePath The destination path of the unarchived files
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
* @param progressBlock 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 *)filePath
overwrite:(BOOL)overwrite
progress:(nullable void (^)(URKFileInfo *currentFile, CGFloat percentArchiveDecompressed))progressBlock
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
*
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
* @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:(URKFileInfo *)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 progressBlock 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:(URKFileInfo *)fileInfo
progress:(nullable void (^)(CGFloat percentDecompressed))progressBlock
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
*
* @param filePath The path of the file within the archive to be expanded
*
* - *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
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 progressBlock 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))progressBlock
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 in alphabetical order, allowing you to perform an
* action using its info. Supports NSProgress for progress reporting, which also allows
* cancellation of the operation in the middle
*
* @param action The action to perform using the data
*
* - *fileInfo* The metadata of the file within the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an error if any was returned
*
* @return YES if no errors were encountered, NO otherwise
*/
- (BOOL)performOnFilesInArchive:(void(^)(URKFileInfo *fileInfo, BOOL *stop))action
error:(NSError **)error;
/**
* Extracts each file in the archive into memory, allowing you to perform an action
* on it (not sorted). Supports NSProgress for progress reporting, which also allows
* cancellation of the operation in the middle
*
* @param action The action to perform using the data
*
* - *fileInfo* The metadata of the file within the archive
* - *fileData* The full data of the file in the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an error if any was returned
*
* @return YES if no errors were encountered, NO otherwise
*/
- (BOOL)performOnDataInArchive:(void(^)(URKFileInfo *fileInfo, NSData *fileData, BOOL *stop))action
error:(NSError **)error;
/**
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction
*
* @param filePath The path of the file within the archive to be expanded
* @param error Contains an NSError object when there was an error reading the archive
* @param action The block to run for each chunk of data, each of size <= bufferSize
*
* - *dataChunk* The data read from the archived file. Read bytes and length to write the data
* - *percentDecompressed* The percentage of the file that has been decompressed
*
* @return YES if all data was read successfully, NO if an error was encountered
*/
- (BOOL)extractBufferedDataFromFile:(NSString *)filePath
error:(NSError **)error
action:(void(^)(NSData *dataChunk, CGFloat percentDecompressed))action;
/**
* YES if archive protected with a password, NO otherwise
*/
- (BOOL)isPasswordProtected;
/**
* Tests whether the provided password unlocks the archive
*
* @return YES if correct password or archive is not password protected, NO if password is wrong
*/
- (BOOL)validatePassword;
/**
Extract each file in the archive, checking whether the data matches the CRC checksum
stored at the time it was written
@return YES if the data is all correct, false if any check failed
*/
- (BOOL)checkDataIntegrity;
/**
Extract a particular file, to determine if its data matches the CRC
checksum stored at the time it written
@param filePath The file in the archive to check
@return YES if the data is correct, false if any check failed
*/
- (BOOL)checkDataIntegrityOfFile:(NSString *)filePath;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,158 @@
//
// URKFileInfo.h
// UnrarKit
//
#import <Foundation/Foundation.h>
#import "UnrarKitMacros.h"
RarosHppIgnore
#import "raros.hpp"
#pragma clang diagnostic pop
DllHppIgnore
#import "dll.hpp"
#pragma clang diagnostic pop
/* See http://www.forensicswiki.org/wiki/RAR and
http://www.rarlab.com/technote.htm#filehead for
more information about the RAR File Header spec */
/**
* Defines the packing methods that can be used on a file in an archive
*/
typedef NS_ENUM(NSUInteger, URKCompressionMethod) {
/**
* No compression is used
*/
URKCompressionMethodStorage = 0x30,
/**
* Fastest compression
*/
URKCompressionMethodFastest = 0x31,
/**
* Fast compression
*/
URKCompressionMethodFast = 0x32,
/**
* Normal compression
*/
URKCompressionMethodNormal = 0x33,
/**
* Good compression
*/
URKCompressionMethodGood = 0x34,
/**
* Best compression
*/
URKCompressionMethodBest = 0x35,
};
/**
* Defines the various operating systems that can be used when archiving
*/
typedef NS_ENUM(NSUInteger, URKHostOS) {
/**
* MS-DOS
*/
URKHostOSMSDOS = 0,
/**
* OS/2
*/
URKHostOSOS2 = 1,
/**
* Windows
*/
URKHostOSWindows = 2,
/**
* Unix
*/
URKHostOSUnix = 3,
/**
* Mac OS
*/
URKHostOSMacOS = 4,
/**
* BeOS
*/
URKHostOSBeOS = 5,
};
/**
* A wrapper around a RAR archive's file header, defining the various fields
* it contains
*/
@interface URKFileInfo : NSObject
/**
* The name of the file's archive
*/
@property (readonly, strong) NSString *archiveName;
/**
* The name of the file
*/
@property (readonly, strong) NSString *filename;
/**
* The timestamp of the file
*/
@property (readonly, strong) NSDate *timestamp;
/**
* The CRC checksum of the file
*/
@property (readonly, assign) NSUInteger CRC;
/**
* Size of the uncompressed file
*/
@property (readonly, assign) long long uncompressedSize;
/**
* Size of the compressed file
*/
@property (readonly, assign) long long compressedSize;
/**
* YES if the file will be continued of the next volume
*/
@property (readonly) BOOL isEncryptedWithPassword;
/**
* YES if the file is a directory
*/
@property (readonly) BOOL isDirectory;
/**
* The type of compression
*/
@property (readonly, assign) URKCompressionMethod compressionMethod;
/**
* The OS of the file
*/
@property (readonly, assign) URKHostOS hostOS;
/**
* Returns a URKFileInfo instance for the given extended header data
*
* @param fileHeader The header data for a RAR file
*
* @return an instance of URKFileInfo
*/
+ (instancetype) fileInfo:(struct RARHeaderDataEx *)fileHeader;
@end

View File

@ -0,0 +1,19 @@
//
// UnrarKit.h
// UnrarKit
//
// Created by Dov Frankel on 1/9/2015.
// Copyright (c) 2015 Abbey Code. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for UnrarKit.
FOUNDATION_EXPORT double UnrarKitVersionNumber;
//! Project version string for UnrarKit.
FOUNDATION_EXPORT const unsigned char UnrarKitVersionString[];
#import "URKArchive.h"
#import "URKFileInfo.h"

View File

@ -0,0 +1,126 @@
//
// UnrarKitMacros.h
// UnrarKit
//
// Created by Dov Frankel on 8/8/17.
// Copyright © 2017 Abbey Code. All rights reserved.
//
#ifndef UnrarKitMacros_h
#define UnrarKitMacros_h
//#import "Availability.h"
//#import "AvailabilityInternal.h"
#define _stringify(a) #a
#define RarHppIgnore \
_Pragma( _stringify( clang diagnostic push ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wcast-align" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wextra-semi" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wold-style-cast" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wpadded" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wshorten-64-to-32" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wcast-qual" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wundef" ) ) \
#define DllHppIgnore \
_Pragma( _stringify( clang diagnostic push ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wstrict-prototypes" ) ) \
#define RarosHppIgnore \
_Pragma( _stringify( clang diagnostic push ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundef"
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
// iOS 10, macOS 10.12, tvOS 10.0, watchOS 3.0
#define UNIFIED_LOGGING_SUPPORTED \
__IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 \
|| __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 \
|| __TV_OS_VERSION_MIN_REQUIRED >= 100000 \
|| __WATCH_OS_VERSION_MIN_REQUIRED >= 30000
#if TARGET_OS_IPHONE
#define SDK_10_13_MAJOR 11
#define SDK_10_13_MINOR 0
#else
#define SDK_10_13_MAJOR 10
#define SDK_10_13_MINOR 13
#endif
#if UNIFIED_LOGGING_SUPPORTED
#import <os/log.h>
#import <os/activity.h>
// Called from +[UnrarKit initialize] and +[URKArchiveTestCase setUp]
extern os_log_t unrarkit_log; // Declared in URKArchive.m
extern BOOL unrarkitIsAtLeast10_13SDK; // Declared in URKArchive.m
#define URKLogInit() \
unrarkit_log = os_log_create("com.abbey-code.UnrarKit", "General"); \
\
NSOperatingSystemVersion minVersion; \
minVersion.majorVersion = SDK_10_13_MAJOR; \
minVersion.minorVersion = SDK_10_13_MINOR; \
minVersion.patchVersion = 0; \
unrarkitIsAtLeast10_13SDK = [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:minVersion]; \
URKLogDebug("Is >= 10.13 (or iOS 11): %@", unrarkitIsAtLeast10_13SDK ? @"YES" : @"NO");
#define URKLog(format, ...) os_log(unrarkit_log, format, ##__VA_ARGS__);
#define URKLogInfo(format, ...) os_log_info(unrarkit_log, format, ##__VA_ARGS__);
#define URKLogDebug(format, ...) os_log_debug(unrarkit_log, format, ##__VA_ARGS__);
#define URKLogError(format, ...) \
if (unrarkitIsAtLeast10_13SDK) os_log_error(unrarkit_log, format, ##__VA_ARGS__); \
else os_log_with_type(unrarkit_log, OS_LOG_TYPE_ERROR, format, ##__VA_ARGS__);
#define URKLogFault(format, ...) \
if (unrarkitIsAtLeast10_13SDK) os_log_fault(unrarkit_log, format, ##__VA_ARGS__); \
else os_log_with_type(unrarkit_log, OS_LOG_TYPE_FAULT, format, ##__VA_ARGS__);
#define URKCreateActivity(name) \
os_activity_t activity = os_activity_create(name, OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT); \
os_activity_scope(activity);
#else // Fall back to regular NSLog
// No-op, as nothing needs to be initialized
#define URKLogInit() (void)0
// Only used below
#define _removeLogFormatTokens(format) [[@format \
stringByReplacingOccurrencesOfString:@"{public}" withString:@""] \
stringByReplacingOccurrencesOfString:@"{iec-bytes}" withString:@""]
#define _nsLogWithoutWarnings(format, ...) \
_Pragma( _stringify( clang diagnostic push ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wformat-nonliteral" ) ) \
_Pragma( _stringify( clang diagnostic ignored "-Wformat-security" ) ) \
NSLog(_removeLogFormatTokens(format), ##__VA_ARGS__); \
_Pragma( _stringify( clang diagnostic pop ) )
// All levels do the same thing
#define URKLog(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
#define URKLogInfo(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
#define URKLogDebug(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
#define URKLogError(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
#define URKLogFault(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
// No-op, as no equivalent to Activities exists
#define URKCreateActivity(name) (void)0
#pragma clang diagnostic pop
#endif // UNIFIED_LOGGING_SUPPORTED
#endif /* UnrarKitMacros_h */

185
Carthage/Build/iOS/UnrarKit.framework/Headers/dll.hpp generated vendored Normal file
View File

@ -0,0 +1,185 @@
#ifndef _UNRAR_DLL_
#define _UNRAR_DLL_
#pragma pack(1)
#define ERAR_SUCCESS 0
#define ERAR_END_ARCHIVE 10
#define ERAR_NO_MEMORY 11
#define ERAR_BAD_DATA 12
#define ERAR_BAD_ARCHIVE 13
#define ERAR_UNKNOWN_FORMAT 14
#define ERAR_EOPEN 15
#define ERAR_ECREATE 16
#define ERAR_ECLOSE 17
#define ERAR_EREAD 18
#define ERAR_EWRITE 19
#define ERAR_SMALL_BUF 20
#define ERAR_UNKNOWN 21
#define ERAR_MISSING_PASSWORD 22
#define ERAR_EREFERENCE 23
#define ERAR_BAD_PASSWORD 24
#define RAR_OM_LIST 0
#define RAR_OM_EXTRACT 1
#define RAR_OM_LIST_INCSPLIT 2
#define RAR_SKIP 0
#define RAR_TEST 1
#define RAR_EXTRACT 2
#define RAR_VOL_ASK 0
#define RAR_VOL_NOTIFY 1
#define RAR_DLL_VERSION 8
#define RAR_HASH_NONE 0
#define RAR_HASH_CRC32 1
#define RAR_HASH_BLAKE2 2
#ifdef _UNIX
#define CALLBACK
#define PASCAL
#define LONG long
#define HANDLE void *
#define LPARAM long
#define UINT unsigned int
#endif
#define RHDF_SPLITBEFORE 0x01
#define RHDF_SPLITAFTER 0x02
#define RHDF_ENCRYPTED 0x04
#define RHDF_SOLID 0x10
#define RHDF_DIRECTORY 0x20
struct RARHeaderData
{
char ArcName[260];
char FileName[260];
unsigned int Flags;
unsigned int PackSize;
unsigned int UnpSize;
unsigned int HostOS;
unsigned int FileCRC;
unsigned int FileTime;
unsigned int UnpVer;
unsigned int Method;
unsigned int FileAttr;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
};
struct RARHeaderDataEx
{
char ArcName[1024];
wchar_t ArcNameW[1024];
char FileName[1024];
wchar_t FileNameW[1024];
unsigned int Flags;
unsigned int PackSize;
unsigned int PackSizeHigh;
unsigned int UnpSize;
unsigned int UnpSizeHigh;
unsigned int HostOS;
unsigned int FileCRC;
unsigned int FileTime;
unsigned int UnpVer;
unsigned int Method;
unsigned int FileAttr;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
unsigned int DictSize;
unsigned int HashType;
char Hash[32];
unsigned int RedirType;
wchar_t *RedirName;
unsigned int RedirNameSize;
unsigned int DirTarget;
unsigned int MtimeLow;
unsigned int MtimeHigh;
unsigned int CtimeLow;
unsigned int CtimeHigh;
unsigned int AtimeLow;
unsigned int AtimeHigh;
unsigned int Reserved[988];
};
struct RAROpenArchiveData
{
char *ArcName;
unsigned int OpenMode;
unsigned int OpenResult;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
};
typedef int (CALLBACK *UNRARCALLBACK)(UINT msg,LPARAM UserData,LPARAM P1,LPARAM P2);
#define ROADF_VOLUME 0x0001
#define ROADF_COMMENT 0x0002
#define ROADF_LOCK 0x0004
#define ROADF_SOLID 0x0008
#define ROADF_NEWNUMBERING 0x0010
#define ROADF_SIGNED 0x0020
#define ROADF_RECOVERY 0x0040
#define ROADF_ENCHEADERS 0x0080
#define ROADF_FIRSTVOLUME 0x0100
struct RAROpenArchiveDataEx
{
char *ArcName;
wchar_t *ArcNameW;
unsigned int OpenMode;
unsigned int OpenResult;
char *CmtBuf;
unsigned int CmtBufSize;
unsigned int CmtSize;
unsigned int CmtState;
unsigned int Flags;
UNRARCALLBACK Callback;
LPARAM UserData;
unsigned int Reserved[28];
};
enum UNRARCALLBACK_MESSAGES {
UCM_CHANGEVOLUME,UCM_PROCESSDATA,UCM_NEEDPASSWORD,UCM_CHANGEVOLUMEW,
UCM_NEEDPASSWORDW
};
typedef int (PASCAL *CHANGEVOLPROC)(char *ArcName,int Mode);
typedef int (PASCAL *PROCESSDATAPROC)(unsigned char *Addr,int Size);
#ifdef __cplusplus
extern "C" {
#endif
HANDLE PASCAL RAROpenArchive(struct RAROpenArchiveData *ArchiveData);
HANDLE PASCAL RAROpenArchiveEx(struct RAROpenArchiveDataEx *ArchiveData);
int PASCAL RARCloseArchive(HANDLE hArcData);
int PASCAL RARReadHeader(HANDLE hArcData,struct RARHeaderData *HeaderData);
int PASCAL RARReadHeaderEx(HANDLE hArcData,struct RARHeaderDataEx *HeaderData);
int PASCAL RARProcessFile(HANDLE hArcData,int Operation,char *DestPath,char *DestName);
int PASCAL RARProcessFileW(HANDLE hArcData,int Operation,wchar_t *DestPath,wchar_t *DestName);
void PASCAL RARSetCallback(HANDLE hArcData,UNRARCALLBACK Callback,LPARAM UserData);
void PASCAL RARSetChangeVolProc(HANDLE hArcData,CHANGEVOLPROC ChangeVolProc);
void PASCAL RARSetProcessDataProc(HANDLE hArcData,PROCESSDATAPROC ProcessDataProc);
void PASCAL RARSetPassword(HANDLE hArcData,char *Password);
int PASCAL RARGetDllVersion();
#ifdef __cplusplus
}
#endif
#pragma pack()
#endif

View File

@ -0,0 +1,36 @@
#ifndef _RAR_RAROS_
#define _RAR_RAROS_
#ifdef __EMX__
#define _EMX
#endif
#ifdef __DJGPP__
#define _DJGPP
#define _EMX
#endif
#if defined(__WIN32__) || defined(_WIN32)
#define _WIN_ALL // Defined for all Windows platforms, 32 and 64 bit, mobile and desktop.
#ifdef _M_X64
#define _WIN_64
#else
#define _WIN_32
#endif
#endif
#if defined(ANDROID) || defined(__ANDROID__)
#define _UNIX
#define _ANDROID
#endif
#ifdef __APPLE__
#define _UNIX
#define _APPLE
#endif
#if !defined(_EMX) && !defined(_WIN_ALL) && !defined(_BEOS) && !defined(_APPLE)
#define _UNIX
#endif
#endif

BIN
Carthage/Build/iOS/UnrarKit.framework/Info.plist generated vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
framework module UnrarKit {
umbrella header "UnrarKit.h"
export *
module * { export * }
}

BIN
Carthage/Build/iOS/UnrarKit.framework/UnrarKit generated vendored Executable file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.com.abbey-code.UnzipKit</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.9</string>
<key>CFBundleVersion</key>
<string>1.9</string>
</dict>
</plist>

Binary file not shown.

View File

@ -0,0 +1,949 @@
//
// UZKArchive.h
// UnzipKit
//
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import "UZKFileInfo.h"
/**
* Defines the various error codes that the listing and extraction methods return.
* These are returned in NSError's [code]([NSError code]) field.
*/
typedef NS_ENUM(NSInteger, UZKErrorCode) {
/**
* An error from zlib reading or writing the file (UNZ_ERRNO/ZIP_ERRNO)
*/
UZKErrorCodeZLibError = -1,
/**
* An error with a parameter, usually the file name (UNZ_PARAMERROR/ZIP_PARAMERROR)
*/
UZKErrorCodeParameterError = -102,
/**
* The Zip file appears to be corrupted, or invalid (UNZ_BADZIPFILE/ZIP_BADZIPFILE)
*/
UZKErrorCodeBadZipFile = -103,
/**
* An error internal to MiniZip (UNZ_INTERNALERROR/ZIP_INTERNALERROR)
*/
UZKErrorCodeInternalError = -104,
/**
* The decompressed file's CRC doesn't match the original file's CRC (UNZ_CRCERROR)
*/
UZKErrorCodeCRCError = -105,
/**
* Failure to find/open the archive
*/
UZKErrorCodeArchiveNotFound = 101,
/**
* Error reading or advancing through the archive
*/
UZKErrorCodeFileNavigationError = 102,
/**
* Error finding a file in the archive
*/
UZKErrorCodeFileNotFoundInArchive = 103,
/**
* Error writing an extracted file to disk
*/
UZKErrorCodeOutputError = 104,
/**
* The destination directory is a file. Not used anymore
*/
UZKErrorCodeOutputErrorPathIsAFile = 105,
/**
* Password given doesn't decrypt the archive
*/
UZKErrorCodeInvalidPassword = 106,
/**
* Error reading a file in the archive
*/
UZKErrorCodeFileRead = 107,
/**
* Error opening a file in the archive for writing
*/
UZKErrorCodeFileOpenForWrite = 108,
/**
* Error writing a file in the archive
*/
UZKErrorCodeFileWrite = 109,
/**
* Error closing the file in the archive
*/
UZKErrorCodeFileCloseWriting = 110,
/**
* Error deleting a file in the archive
*/
UZKErrorCodeDeleteFile = 111,
/**
* Tried to read before all writes have completed, or vise-versa
*/
UZKErrorCodeMixedModeAccess = 112,
/**
* Error reading the global comment of the archive
*/
UZKErrorCodeReadComment = 113,
/**
* The CRC given up front doesn't match the calculated CRC
*/
UZKErrorCodePreCRCMismatch = 114,
/**
* The zip is compressed using Deflate64 (compression method 9), which isn't supported
*/
UZKErrorCodeDeflate64 = 115,
/**
* User cancelled the operation
*/
UZKErrorCodeUserCancelled = 116,
};
typedef NSString *const UZKProgressInfoKey;
/**
* Defines the keys passed in `-[NSProgress userInfo]` for certain methods
*/
static UZKProgressInfoKey _Nonnull
/**
* For `extractFilesTo:overwrite:error:`, this key contains an instance of URKFileInfo with the file currently being extracted
*/
UZKProgressInfoKeyFileInfoExtracting = @"UZKProgressInfoKeyFileInfoExtracting";
NS_ASSUME_NONNULL_BEGIN
extern NSString *UZKErrorDomain;
@interface UZKArchive : NSObject
// Minimum of iOS 9, macOS 10.11 SDKs
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED > 90000) || (defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
<NSProgressReporting>
#endif
/**
* The URL of the archive. Returns nil if the URL becomes unreachable
*/
@property(weak, nonatomic, readonly, nullable) NSURL *fileURL;
/**
* The filename of the archive. Returns nil if the archive file becomes unreachable
*/
@property(weak, nonatomic, readonly, nullable) NSString *filename;
/**
* The password of the archive
*/
@property(strong, nullable) NSString *password;
/**
* The global comment inside the archive
*
* Comments are written in UTF-8, and read in UTF-8 and Windows/CP-1252, falling back to defaultCStringEncoding
*/
@property(retain, atomic, nullable) NSString *comment;
/**
* Can be used for progress reporting, but it's not necessary. You can also use
* implicit progress reporting. If you don't use it, one will still be created,
* which will become a child progress of whichever one is the current NSProgress
* instance.
*
* To use this, assign it before beginning an operation that reports progress. Once
* the method you're calling has a reference to it, it will nil it out. Please check
* for nil before assigning it to avoid concurrency conflicts.
*/
@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
*
* @param filePath A path to the archive file
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the path isn't reachable
*/
- (nullable instancetype)initWithPath:(NSString *)filePath error:(NSError **)error;
/**
* Creates and returns an archive at the given URL
*
* @param fileURL The URL of the archive file
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the URL isn't reachable
*/
- (nullable instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
/**
* 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
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the path isn't reachable
*/
- (nullable instancetype)initWithPath:(NSString *)filePath password:(nullable NSString *)password error:(NSError **)error;
/**
* 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
* @param error Returns an error code if the object can't be initialized
*
* @return Returns a UZKArchive object, or nil if the URL isn't reachable
*/
- (nullable instancetype)initWithURL:(NSURL *)fileURL password:(nullable NSString *)password error:(NSError **)error;
#pragma mark - Read Methods
/**
* Determines whether a file is a Zip file by reading the header
*
* @param filePath Path to the file being checked
*
* @return YES if the file exists and contains a signature indicating it is a Zip file
*/
+ (BOOL)pathIsAZip:(NSString *)filePath;
/**
* Determines whether a file is a Zip file by reading the header
*
* @param fileURL URL of the file being checked
*
* @return YES if the file exists and contains a signature indicating it is a Zip file
*/
+ (BOOL)urlIsAZip:(NSURL *)fileURL;
/**
* Lists the names of the files in the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of NSString containing the paths within the archive's contents, or nil if an error was encountered
*/
- (nullable NSArray<NSString*> *)listFilenames:(NSError **)error;
/**
* Lists the various attributes of each file in the archive
*
* @param error Contains an NSError object when there was an error reading the archive
*
* @return Returns a list of UZKFileInfo objects, which contain metadata about the archive's files, or nil if an error was encountered
*/
- (nullable NSArray<UZKFileInfo*> *)listFileInfo:(NSError **)error;
/**
* Writes all files in the archive to the given path. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction. Use the progress property (as explained in the README) to
* retrieve more detailed information, such as the current file being extracted, number of files extracted,
* and the URKFileInfo instance being extracted
*
* @param destinationDirectory The destination path of the unarchived files
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
*
* @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
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
*
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
* @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
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
*
* @param filePath The path of the file within the archive to be expanded
* @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
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
* allows cancellation in the middle of the operation
*
* @param action The action to perform using the data
*
* - *fileInfo* The metadata of the file within the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an error if any was returned
*
* @return YES if no errors were encountered, NO otherwise
*/
- (BOOL)performOnFilesInArchive:(void(^)(UZKFileInfo *fileInfo, BOOL *stop))action
error:(NSError **)error;
/**
* Extracts each file in the archive into memory, allowing you to perform an action
* on it. Supports NSProgress for progress reporting, which also allows cancellation
* in the middle of the operation
*
* @param action The action to perform using the data
*
* - *fileInfo* The metadata of the file within the archive
* - *fileData* The full data of the file in the archive
* - *stop* Set to YES to stop reading the archive
*
* @param error Contains an error if any was returned
*
* @return YES if no errors were encountered, NO otherwise
*/
- (BOOL)performOnDataInArchive:(void(^)(UZKFileInfo *fileInfo, NSData *fileData, BOOL *stop))action
error:(NSError **)error;
/**
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
* allows cancellation in the middle of extraction
*
* @param filePath The path of the file within the archive to be expanded
* @param error Contains an NSError object when there was an error reading the archive
* @param action The block to run for each chunk of data, each of size <= bufferSize
*
* - *dataChunk* The data read from the archived file. Read bytes and length to write the data
* - *percentDecompressed* The percentage of the file that has been decompressed
*
* @return YES if all data was read successfully, NO if an error was encountered
*/
- (BOOL)extractBufferedDataFromFile:(NSString *)filePath
error:(NSError **)error
action:(void(^)(NSData *dataChunk, CGFloat percentDecompressed))action;
/**
* YES if archive protected with a password, NO otherwise
*/
- (BOOL)isPasswordProtected;
/**
* Tests whether the provided password unlocks the archive
*
* @return YES if correct password or archive is not password protected, NO if password is wrong
*/
- (BOOL)validatePassword;
/**
Extract each file in the archive, checking whether the data matches the CRC checksum
stored at the time it was written
@return YES if the data is all correct, false if any check failed
*/
- (BOOL)checkDataIntegrity;
/**
Extract a particular file, to determine if its data matches the CRC
checksum stored at the time it written
@param filePath The file in the archive to check
@return YES if the data is correct, false if any check failed
*/
- (BOOL)checkDataIntegrityOfFile:(NSString *)filePath;
#pragma mark - Write Methods
/**
* Writes the data to the zip file, overwriting it if a file of that name already exists
* in the archive. Supports NSProgress for progress reporting, which DOES NOT allow cancellation
* in the middle of writing
*
* @param data Data to write into the archive
* @param filePath The full path to the target file in the archive
* @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
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
*
* @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 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
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
*
* @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 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
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
* 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 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
error:(NSError **)error;
/**
* 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 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
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.
*
* @param filePath The full path to the target file in the archive
* @param error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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.
*
* @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 error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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.
*
* @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 error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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, 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 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 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 error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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, 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 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 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 preCRC The CRC-32 for the data being sent. Only necessary if encrypting the file.
Pass 0 otherwise
* @param error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
CRC:(unsigned long)preCRC
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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, 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 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 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 preCRC The CRC-32 for the data being sent. Only necessary if encrypting the file.
* Pass 0 otherwise
* @param password Override the password associated with the archive (not recommended)
* @param error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
CRC:(unsigned long)preCRC
password:(nullable NSString *)password
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* 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, 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 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 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 preCRC The CRC-32 for the data being sent. Only necessary if encrypting the file.
* Pass 0 otherwise
* @param password Override the password associated with the archive (not recommended)
* @param error Contains an NSError object when there was an error writing to the archive
* @param action Contains your code to loop through the source bytes and write them to the
* archive. Each time a chunk of data is ready to be written, call writeData,
* passing in a pointer to the bytes and their length. Return YES if successful,
* or NO on error (in which case, you should assign the actionError parameter
*
* - *writeData* Call this block to write some bytes into the archive. It returns NO if the
* write failed. If this happens, you should return from the action block, and
* handle the NSError returned into the error reference
* - *actionError* Assign to an NSError instance before returning NO
*
* @return YES if successful, NO on error
*/
- (BOOL)writeIntoBuffer:(NSString *)filePath
fileDate:(nullable NSDate *)fileDate
posixPermissions:(short)permissions
compressionMethod:(UZKCompressionMethod)method
overwrite:(BOOL)overwrite
CRC:(unsigned long)preCRC
password:(nullable NSString *)password
error:(NSError **)error
block:(BOOL(^)(BOOL(^writeData)(const void *bytes, unsigned int length), NSError **actionError))action;
/**
* Removes the given file from the archive
*
* @param filePath The file in the archive you wish to delete
* @param error Contains an NSError object when there was an error writing to the archive
*
* @return YES if the file was successfully deleted, NO otherwise
*/
- (BOOL)deleteFile:(NSString *)filePath error:(NSError **)error;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,90 @@
//
// UZKFileInfo.h
// UnzipKit
//
//
#import <Foundation/Foundation.h>
@class UZKArchive;
/**
* Defines the various compression levels that can be applied to a file
*/
typedef NS_ENUM(NSInteger, UZKCompressionMethod) {
/**
* Default level
*/
UZKCompressionMethodDefault= -1,
/**
* No compression
*/
UZKCompressionMethodNone= 0,
/**
* Fastest compression
*/
UZKCompressionMethodFastest= 1,
/**
* Best (slowest) compression
*/
UZKCompressionMethodBest= 9
};
@interface UZKFileInfo : NSObject
/**
* The name of the file
*/
@property (readonly, strong) NSString *filename;
/**
* The timestamp of the file
*/
@property (readonly, nonatomic) NSDate *timestamp;
/**
* The CRC checksum of the file
*/
@property (readonly) NSUInteger CRC;
/**
* Size of the uncompressed file
*/
@property (readonly) unsigned long long int uncompressedSize;
/**
* Size of the compressed file
*/
@property (readonly) unsigned long long int compressedSize;
/**
* YES if the file will be continued of the next volume
*/
@property (readonly) BOOL isEncryptedWithPassword;
/**
* YES if the file is a directory
*/
@property (readonly) BOOL isDirectory;
/**
* The type of compression
*/
@property (readonly) UZKCompressionMethod compressionMethod;
/**
* The POSIX permissions of the file, like you would get by retrieving the `NSFilePosixPermissions`
* key from the attributes NSFileManager returns. Assign in octal form, like 0777 in Objective-C or
* 0o777 in Swift
*/
@property (nonatomic, readonly) short posixPermissions;
@end

View File

@ -0,0 +1,19 @@
//
// UnzipKit.h
// UnzipKit
//
// Created by Dov Frankel on 12/16/14.
// Copyright (c) 2014 Abbey Code. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for UnzipKit.
FOUNDATION_EXPORT double UnzipKitVersionNumber;
//! Project version string for UnzipKit.
FOUNDATION_EXPORT const unsigned char UnzipKitVersionString[];
#import "UZKArchive.h"
#import "UZKFileInfo.h"

BIN
Carthage/Build/iOS/UnzipKit.framework/Info.plist generated vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
framework module UnzipKit {
umbrella header "UnzipKit.h"
export *
module * { export * }
}

View File

@ -0,0 +1,23 @@
//
// UZKFileInfo_Private.h
// UnzipKit
//
//
@import Foundation;
#import "unzip.h"
@interface UZKFileInfo (Private)
/**
* Returns a UZKFileInfo instance for the given extended header data
*
* @param fileInfo The header data for a Zip file
* @param filename The archive that contains the file
*
* @return an instance of UZKFileInfo
*/
+ (instancetype) fileInfo:(unz_file_info64 *)fileInfo filename:(NSString *)filename;
@end

BIN
Carthage/Build/iOS/UnzipKit.framework/UnzipKit generated vendored Executable file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
root = true
[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View File

@ -0,0 +1 @@
* text=auto eol=lf

View File

@ -0,0 +1,4 @@
github: sindresorhus
open_collective: sindresorhus
patreon: sindresorhus
custom: https://sindresorhus.com/donate

View File

@ -0,0 +1,4 @@
/.build
/Packages
xcuserdata
project.xcworkspace

View File

@ -0,0 +1,181 @@
whitelist_rules:
- anyobject_protocol
- array_init
- attributes
- block_based_kvo
- class_delegate_protocol
- closing_brace
- closure_end_indentation
- closure_parameter_position
- closure_spacing
- collection_alignment
- colon
- comma
- compiler_protocol_init
- conditional_returns_on_newline
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- control_statement
- custom_rules
- deployment_target
- discarded_notification_center_observer
- discouraged_direct_init
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- duplicate_enum_cases
- duplicate_imports
- dynamic_inline
- empty_collection_literal
- empty_count
- empty_enum_arguments
- empty_parameters
- empty_parentheses_with_trailing_closure
- empty_string
- empty_xctest_method
- enum_case_associated_value_count
- explicit_init
- fallthrough
- fatal_error_message
- first_where
- flatmap_over_map_reduce
- for_where
- generic_type_name
- identical_operands
- identifier_name
- implicit_getter
- implicit_return
- inert_defer
- is_disjoint
- joined_default_parameter
- last_where
- leading_whitespace
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- legacy_hashing
- legacy_multiple
- legacy_nsgeometry_functions
- legacy_random
- literal_expression_end_indentation
- lower_acl_than_parent
- mark
- modifier_order
- multiline_arguments
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- nimble_operator
- no_extension_access_modifier
- no_fallthrough_only
- no_space_in_method_call
- notification_center_detachment
- nsobject_prefer_isequal
- number_separator
- object_literal
- opening_brace
- operator_usage_whitespace
- operator_whitespace
- orphaned_doc_comment
- overridden_super_call
- prefer_self_type_over_type_of_self
- private_action
- private_outlet
- private_unit_test
- prohibited_super_call
- protocol_property_accessors_order
- reduce_boolean
- reduce_into
- redundant_discardable_let
- redundant_nil_coalescing
- redundant_objc_attribute
- redundant_optional_initialization
- redundant_set_access_control
- redundant_string_enum_value
- redundant_type_annotation
- redundant_void_return
- required_enum_case
- return_arrow_whitespace
- shorthand_operator
- sorted_first_last
- statement_position
- static_operator
- strong_iboutlet
- superfluous_disable_command
- switch_case_alignment
- switch_case_on_newline
- syntactic_sugar
- toggle_bool
- trailing_closure
- trailing_comma
- trailing_newline
- trailing_semicolon
- trailing_whitespace
- unavailable_function
- unneeded_break_in_switch
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- untyped_error_in_catch
- unused_closure_parameter
- unused_control_flow_label
- unused_enumerated
- unused_optional_binding
- unused_setter_value
- valid_ibinspectable
- vertical_parameter_alignment
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- void_return
- weak_delegate
- xct_specific_matcher
- xctfail_message
- yoda_condition
analyzer_rules:
- unused_declaration
- unused_import
force_cast: warning
force_unwrapping: warning
number_separator:
minimum_length: 5
object_literal:
image_literal: false
discouraged_object_literal:
color_literal: false
identifier_name:
max_length:
warning: 100
error: 100
min_length:
warning: 2
error: 2
validates_start_with_lowercase: false
allowed_symbols:
- '_'
excluded:
- 'x'
- 'y'
- 'a'
- 'b'
- 'x1'
- 'x2'
- 'y1'
- 'y2'
deployment_target:
macOS_deployment_target: '10.12'
custom_rules:
no_nsrect:
regex: '\bNSRect\b'
match_kinds: typeidentifier
message: 'Use CGRect instead of NSRect'
no_nssize:
regex: '\bNSSize\b'
match_kinds: typeidentifier
message: 'Use CGSize instead of NSSize'
no_nspoint:
regex: '\bNSPoint\b'
match_kinds: typeidentifier
message: 'Use CGPoint instead of NSPoint'

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@ -0,0 +1,13 @@
Pod::Spec.new do |s|
s.name = 'DockProgress'
s.version = '3.2.0'
s.summary = 'Show progress in your app\'s Dock icon'
s.license = 'MIT'
s.homepage = 'https://github.com/sindresorhus/DockProgress'
s.social_media_url = 'https://twitter.com/sindresorhus'
s.authors = { 'Sindre Sorhus' => 'sindresorhus@gmail.com' }
s.source = { :git => 'https://github.com/sindresorhus/DockProgress.git', :tag => "v#{s.version}" }
s.source_files = 'Sources/**/*.swift'
s.swift_version = '5.3'
s.platform = :macos, '10.12'
end

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@ -0,0 +1,590 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
E3FB30C420EA5DBC009BA1BD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3FB30C320EA5DBC009BA1BD /* AppDelegate.swift */; };
E3FB30C920EA5DBE009BA1BD /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = E3FB30C720EA5DBE009BA1BD /* MainMenu.xib */; };
E3FB30CF20EA5EBD009BA1BD /* DockProgress.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "DockProgress::DockProgress::Product" /* DockProgress.framework */; };
E3FB30D020EA5EBD009BA1BD /* DockProgress.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = "DockProgress::DockProgress::Product" /* DockProgress.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
E3FEB1AB21DC4F70009C38CA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E3FEB1AA21DC4F70009C38CA /* Images.xcassets */; };
OBJ_19 /* DockProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* DockProgress.swift */; };
OBJ_20 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* Utilities.swift */; };
OBJ_27 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
E3FB30D120EA5EBD009BA1BD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = OBJ_1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = "DockProgress::DockProgress";
remoteInfo = DockProgress;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
E3FB30D320EA5EBD009BA1BD /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
E3FB30D020EA5EBD009BA1BD /* DockProgress.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
"DockProgress::DockProgress::Product" /* DockProgress.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DockProgress.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E3FB30C120EA5DBC009BA1BD /* DockProgressExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DockProgressExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
E3FB30C320EA5DBC009BA1BD /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AppDelegate.swift; sourceTree = "<group>"; usesTabs = 1; };
E3FB30C820EA5DBE009BA1BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
E3FB30CA20EA5DBE009BA1BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E3FEB1AA21DC4F70009C38CA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
OBJ_10 /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Utilities.swift; sourceTree = "<group>"; usesTabs = 1; };
OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lineEnding = 0; path = Package.swift; sourceTree = "<group>"; usesTabs = 1; };
OBJ_9 /* DockProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = DockProgress.swift; sourceTree = "<group>"; usesTabs = 1; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
E3FB30BE20EA5DBC009BA1BD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E3FB30CF20EA5EBD009BA1BD /* DockProgress.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
OBJ_21 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
E3FB30C220EA5DBC009BA1BD /* Example */ = {
isa = PBXGroup;
children = (
E3FB30C320EA5DBC009BA1BD /* AppDelegate.swift */,
E3FB30C720EA5DBE009BA1BD /* MainMenu.xib */,
E3FB30CA20EA5DBE009BA1BD /* Info.plist */,
E3FEB1AA21DC4F70009C38CA /* Images.xcassets */,
);
path = Example;
sourceTree = "<group>";
};
OBJ_12 /* Products */ = {
isa = PBXGroup;
children = (
"DockProgress::DockProgress::Product" /* DockProgress.framework */,
E3FB30C120EA5DBC009BA1BD /* DockProgressExample.app */,
);
name = Products;
sourceTree = BUILT_PRODUCTS_DIR;
};
OBJ_5 = {
isa = PBXGroup;
children = (
OBJ_6 /* Package.swift */,
OBJ_7 /* Sources */,
E3FB30C220EA5DBC009BA1BD /* Example */,
OBJ_12 /* Products */,
);
sourceTree = "<group>";
usesTabs = 1;
};
OBJ_7 /* Sources */ = {
isa = PBXGroup;
children = (
OBJ_8 /* DockProgress */,
);
name = Sources;
sourceTree = SOURCE_ROOT;
};
OBJ_8 /* DockProgress */ = {
isa = PBXGroup;
children = (
OBJ_9 /* DockProgress.swift */,
OBJ_10 /* Utilities.swift */,
);
name = DockProgress;
path = Sources/DockProgress;
sourceTree = SOURCE_ROOT;
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
"DockProgress::DockProgress" /* DockProgress */ = {
isa = PBXNativeTarget;
buildConfigurationList = OBJ_15 /* Build configuration list for PBXNativeTarget "DockProgress" */;
buildPhases = (
E3BFC67621FBB9B400C16B1A /* SwiftLint */,
OBJ_18 /* Sources */,
OBJ_21 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = DockProgress;
productName = DockProgress;
productReference = "DockProgress::DockProgress::Product" /* DockProgress.framework */;
productType = "com.apple.product-type.framework";
};
"DockProgress::SwiftPMPackageDescription" /* DockProgressPackageDescription */ = {
isa = PBXNativeTarget;
buildConfigurationList = OBJ_23 /* Build configuration list for PBXNativeTarget "DockProgressPackageDescription" */;
buildPhases = (
OBJ_26 /* Sources */,
);
buildRules = (
);
dependencies = (
);
name = DockProgressPackageDescription;
productName = DockProgressPackageDescription;
productType = "com.apple.product-type.framework";
};
E3FB30C020EA5DBC009BA1BD /* DockProgressExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = E3FB30CE20EA5DBE009BA1BD /* Build configuration list for PBXNativeTarget "DockProgressExample" */;
buildPhases = (
E3FB30BD20EA5DBC009BA1BD /* Sources */,
E3FB30BE20EA5DBC009BA1BD /* Frameworks */,
E3FB30BF20EA5DBC009BA1BD /* Resources */,
E3FB30D320EA5EBD009BA1BD /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
E3FB30D220EA5EBD009BA1BD /* PBXTargetDependency */,
);
name = DockProgressExample;
productName = DockProgressExample;
productReference = E3FB30C120EA5DBC009BA1BD /* DockProgressExample.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
OBJ_1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0940;
LastUpgradeCheck = 1200;
TargetAttributes = {
"DockProgress::DockProgress" = {
LastSwiftMigration = 1020;
};
E3FB30C020EA5DBC009BA1BD = {
CreatedOnToolsVersion = 9.4.1;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "DockProgress" */;
compatibilityVersion = "Xcode 12.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = OBJ_5;
productRefGroup = OBJ_12 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
"DockProgress::DockProgress" /* DockProgress */,
"DockProgress::SwiftPMPackageDescription" /* DockProgressPackageDescription */,
E3FB30C020EA5DBC009BA1BD /* DockProgressExample */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
E3FB30BF20EA5DBC009BA1BD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E3FB30C920EA5DBE009BA1BD /* MainMenu.xib in Resources */,
E3FEB1AB21DC4F70009C38CA /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
E3BFC67621FBB9B400C16B1A /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = SwiftLint;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed\"\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
E3FB30BD20EA5DBC009BA1BD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E3FB30C420EA5DBC009BA1BD /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
OBJ_18 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 0;
files = (
OBJ_19 /* DockProgress.swift in Sources */,
OBJ_20 /* Utilities.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
OBJ_26 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 0;
files = (
OBJ_27 /* Package.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
E3FB30D220EA5EBD009BA1BD /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = "DockProgress::DockProgress" /* DockProgress */;
targetProxy = E3FB30D120EA5EBD009BA1BD /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
E3FB30C720EA5DBE009BA1BD /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
E3FB30C820EA5DBE009BA1BD /* Base */,
);
name = MainMenu.xib;
sourceTree = "<group>";
usesTabs = 1;
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
E3FB30CC20EA5DBE009BA1BD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.DockProgressExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
E3FB30CD20EA5DBE009BA1BD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = "";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.DockProgressExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
name = Release;
};
OBJ_16 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = DockProgress.xcodeproj/DockProgress_Info.plist;
MARKETING_VERSION = 3.2.0;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = DockProgress;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGET_NAME = DockProgress;
};
name = Debug;
};
OBJ_17 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = DockProgress.xcodeproj/DockProgress_Info.plist;
MARKETING_VERSION = 3.2.0;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = DockProgress;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGET_NAME = DockProgress;
};
name = Release;
};
OBJ_24 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD = /usr/bin/true;
OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk";
SWIFT_VERSION = 4.0;
};
name = Debug;
};
OBJ_25 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD = /usr/bin/true;
OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk";
SWIFT_VERSION = 4.0;
};
name = Release;
};
OBJ_3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_NS_ASSERTIONS = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-DXcode";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SUPPORTED_PLATFORMS = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
USE_HEADERMAP = NO;
};
name = Debug;
};
OBJ_4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = s;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
OTHER_SWIFT_FLAGS = "-DXcode";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SUPPORTED_PLATFORMS = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
USE_HEADERMAP = NO;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
E3FB30CE20EA5DBE009BA1BD /* Build configuration list for PBXNativeTarget "DockProgressExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E3FB30CC20EA5DBE009BA1BD /* Debug */,
E3FB30CD20EA5DBE009BA1BD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
OBJ_15 /* Build configuration list for PBXNativeTarget "DockProgress" */ = {
isa = XCConfigurationList;
buildConfigurations = (
OBJ_16 /* Debug */,
OBJ_17 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
OBJ_2 /* Build configuration list for PBXProject "DockProgress" */ = {
isa = XCConfigurationList;
buildConfigurations = (
OBJ_3 /* Debug */,
OBJ_4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
OBJ_23 /* Build configuration list for PBXNativeTarget "DockProgressPackageDescription" */ = {
isa = XCConfigurationList;
buildConfigurations = (
OBJ_24 /* Debug */,
OBJ_25 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = OBJ_1 /* Project object */;
}

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DockProgress::DockProgress"
BuildableName = "DockProgress.framework"
BlueprintName = "DockProgress"
ReferencedContainer = "container:DockProgress.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DockProgress::DockProgress"
BuildableName = "DockProgress.framework"
BlueprintName = "DockProgress"
ReferencedContainer = "container:DockProgress.xcodeproj">
</BuildableReference>
</MacroExpansion>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E3FB30C020EA5DBC009BA1BD"
BuildableName = "DockProgressExample.app"
BlueprintName = "DockProgressExample"
ReferencedContainer = "container:DockProgress.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E3FB30C020EA5DBC009BA1BD"
BuildableName = "DockProgressExample.app"
BlueprintName = "DockProgressExample"
ReferencedContainer = "container:DockProgress.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E3FB30C020EA5DBC009BA1BD"
BuildableName = "DockProgressExample.app"
BlueprintName = "DockProgressExample"
ReferencedContainer = "container:DockProgress.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E3FB30C020EA5DBC009BA1BD"
BuildableName = "DockProgressExample.app"
BlueprintName = "DockProgressExample"
ReferencedContainer = "container:DockProgress.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>DockProgress-Package.xcscheme</key>
<dict></dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict></dict>
</dict>
</plist>

View File

@ -0,0 +1,39 @@
import Cocoa
import DockProgress
@main
final class AppDelegate: NSObject, NSApplicationDelegate {
func borrowIconFromApp(_ app: String) {
let icon = NSWorkspace.shared.icon(forFile: NSWorkspace.shared.fullPath(forApplication: app)!)
icon.size = CGSize(width: 128, height: 128)
NSApp.applicationIconImage = icon
}
func applicationDidFinishLaunching(_ notification: Notification) {
borrowIconFromApp("Photos")
let styles: [DockProgress.ProgressStyle] = [
.bar,
.squircle(color: .systemGray),
.circle(radius: 30, color: .white),
.badge(color: .systemBlue, badgeValue: { Int(DockProgress.progress * 12) })
]
var stylesIterator = styles.makeIterator()
_ = stylesIterator.next()
Timer.scheduledTimer(withTimeInterval: 0.02, repeats: true) { _ in
DockProgress.progress += 0.01
if DockProgress.progress > 1 {
if let style = stylesIterator.next() {
DockProgress.resetProgress()
DockProgress.style = style
} else {
// Reset iterator when all is looped.
stylesIterator = styles.makeIterator()
}
}
}
}
}

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<development version="10000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14313.18"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
<connections>
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="DockProgressExample" customModuleProvider="target"/>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>
<menuItem title="DockProgressExample" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="DockProgressExample" systemMenu="apple" id="uQy-DD-JDr">
<items>
<menuItem title="About DockProgressExample" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Services" id="NMo-om-nkz">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
<menuItem title="Hide DockProgressExample" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
</connections>
</menuItem>
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
</connections>
</menuItem>
<menuItem title="Show All" id="Kd2-mp-pUS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit DockProgressExample" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</objects>
</document>

Some files were not shown because too many files have changed in this diff Show More