Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
68 lines (55 loc) · 2.55 KB

File metadata and controls

executable file
·
68 lines (55 loc) · 2.55 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// Coding_FileManager.h
// Coding_iOS
//
// Created by Ease on 14/11/18.
// Copyright (c) 2014年 Coding. All rights reserved.
//
#define kNotificationUploadCompled @"notification_upload_compled"
//{NSURLResponse: response, NSError: error, ProjectFile: data}
#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "DirectoryWatcher.h"
#import "ProjectFile.h"
#import "FileVersion.h"
@class Coding_DownloadTask;
@class Coding_UploadTask;
@class ProjectFile;
@protocol Coding_FileManagerDelegate;
@interface Coding_FileManager : NSObject
//download
+ (Coding_FileManager *)sharedManager;
+ (AFURLSessionManager *)af_manager;
- (AFURLSessionManager *)af_manager;
- (NSURL *)urlForDownloadFolder;
+ (NSArray *)localFileUrlList;
+(NSURL *)diskDownloadUrlForKey:(NSString *)storage_key;
+ (Coding_DownloadTask *)cDownloadTaskForKey:(NSString *)storage_key;
+ (void)cancelCDownloadTaskForKey:(NSString *)storage_key;
+ (Coding_DownloadTask *)cDownloadTaskForResponse:(NSURLResponse *)response;
+ (void)cancelCDownloadTaskForResponse:(NSURLResponse *)response;
- (Coding_DownloadTask *)addDownloadTaskForObj:(id)obj completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler;
//upload
+ (BOOL)writeUploadDataWithName:(NSString *)fileName andAsset:(PHAsset *)asset;
+ (BOOL)writeUploadDataWithName:(NSString *)fileName andImage:(UIImage *)image;
+ (BOOL)deleteUploadDataWithName:(NSString *)fileName;
+ (NSURL *)diskUploadUrlForFile:(NSString *)diskFileName;
+ (Coding_UploadTask *)cUploadTaskForFile:(NSString *)diskFileName;
+ (void)cancelCUploadTaskForFile:(NSString *)diskFileName hasError:(BOOL)hasError;
+ (NSArray *)uploadFilesInProject:(NSString *)project_id andFolder:(NSString *)folder_id;
- (Coding_UploadTask *)addUploadTaskWithFileName:(NSString *)fileName projectIsPublic:(BOOL)is_public;
@end
@interface Coding_DownloadTask : NSObject
@property (strong, nonatomic) NSURLSessionDownloadTask *task;
@property (strong, nonatomic) NSProgress *progress;
@property (strong, nonatomic) NSString *diskFileName;
+ (Coding_DownloadTask *)cDownloadTaskWithTask:(NSURLSessionDownloadTask *)task progress:(NSProgress *)progress fileName:(NSString *)fileName;
- (void)cancel;
@end
@interface Coding_UploadTask : NSObject
@property (strong, nonatomic) NSURLSessionUploadTask *task;
@property (strong, nonatomic) NSProgress *progress;
@property (strong, nonatomic) NSString *fileName;
+ (Coding_UploadTask *)cUploadTaskWithTask:(NSURLSessionUploadTask *)task progress:(NSProgress *)progress fileName:(NSString *)fileName;
- (void)cancel;
@end
Morty Proxy This is a proxified and sanitized view of the page, visit original site.