FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Coding-iOS/Coding_iOS/Util/Manager/Coding_FileManager.h at master · kasumar/Coding-iOS · GitHub
kasumar
/
Coding-iOS
Public
forked from
coding/Coding-iOS
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Coding-iOS
/
Coding_iOS
/
Util
/
Manager
/
Coding_FileManager.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
68 lines (55 loc) · 2.55 KB
Breadcrumbs
Coding-iOS
/
Coding_iOS
/
Util
/
Manager
/
Coding_FileManager.h
Copy path
File metadata and controls
executable file
·
68 lines (55 loc) · 2.55 KB
Raw
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
:
(ALAsset *)
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
Back
|
FazBrowse Home
|
New Git URL