Files
filza27.2/WQArchive.h
T

51 lines
2.7 KiB
Objective-C

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// Extracts zip, tar, tar.gz, gz, bz2, xz, 7z, rar and other formats
/// supported by libarchive into `destination`.
FOUNDATION_EXPORT BOOL WQExtractArchive(NSString *archivePath,
NSString *destination,
NSString *_Nullable *_Nullable message);
/// Destination used when the caller does not specify one
/// (archive name with the archive suffix removed).
FOUNDATION_EXPORT NSString *WQDefaultExtractDestination(NSString *archivePath);
/// Creates a ZIP archive from the given file/directory paths. Paths are
/// stored relative to `baseDirectory` when possible.
FOUNDATION_EXPORT BOOL WQCreateZipArchive(NSArray<NSString *> *paths,
NSString *destination,
NSString *_Nullable baseDirectory,
NSString *_Nullable *_Nullable message);
/// Creates a ZIP with every stored path prefixed (for .ipa Payload/...).
FOUNDATION_EXPORT BOOL WQCreateZipArchiveWithPrefix(NSArray<NSString *> *paths,
NSString *destination,
NSString *_Nullable baseDirectory,
NSString *_Nullable prefix,
NSString *_Nullable *_Nullable message);
/// Creates a .deb from a folder (or .app). A DEBIAN/control file inside the
/// source is reused; otherwise one is generated.
FOUNDATION_EXPORT BOOL WQCreateDebPackage(NSString *source,
NSString *destination,
NSString *_Nullable packageID,
NSString *_Nullable displayName,
NSString *_Nullable version,
NSString *_Nullable description,
NSString *_Nullable *_Nullable message);
/// Creates an .ipa from a .app folder or a folder containing Payload/.
FOUNDATION_EXPORT BOOL WQCreateIpaPackage(NSString *source,
NSString *destination,
NSString *_Nullable *_Nullable message);
/// Extracts the data.tar payload of a .deb into destination (not the ar
/// container members).
FOUNDATION_EXPORT BOOL WQExtractDebPayload(NSString *debPath,
NSString *destination,
NSString *_Nullable *_Nullable message);
NS_ASSUME_NONNULL_END