-
Notifications
You must be signed in to change notification settings - Fork 33
/
NSTask+ULIReadOutput.h
22 lines (15 loc) · 1.1 KB
/
NSTask+ULIReadOutput.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//
// NSTask+ULIReadOutput.h
// Lanyon
//
// Created by Uli Kusterer on 17/04/16.
// Copyright © 2016 Uli Kusterer. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSTask (ULIReadOutput)
+(NSTask*) launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray<NSString *> *)arguments terminationHandlerWithOutput: (void(^)(NSTask* sender, NSData* output, NSData* errOutput))inCompletionBlock;
+(NSTask*) launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray<NSString *> *)arguments terminationHandlerWithOutput: (void(^)(NSTask* sender, NSData* output, NSData* errOutput))inCompletionBlock progressHandler: (void(^ _Nullable)(NSTask* sender, NSData* _Nullable output, NSData* _Nullable errOutput))inProgressBlock;;
+(NSTask*) taskWithLaunchPath:(NSString *)path arguments:(NSArray<NSString *> *)arguments terminationHandlerWithOutput: (void(^)(NSTask* sender, NSData* output, NSData* errOutput))inCompletionBlock progressHandler: (void(^ _Nullable)(NSTask* sender, NSData* _Nullable output, NSData* _Nullable errOutput))inProgressBlock;
@end
NS_ASSUME_NONNULL_END