ACFileManager Class Reference

Inherits from NSObject
Conforms to NSURLSessionDownloadDelegate
Declared in ACFileManager.h

  progressCallback

进度回调

@property (nonatomic, strong) progress progressCallback

Declared In

ACFileManager.h

  progress

下载进度

@property (unsafe_unretained, nonatomic) float progress

Declared In

ACFileManager.h

  fileType

文件类型

@property (nonatomic, copy) NSString *fileType

Declared In

ACFileManager.h

– uploadFileWithfileInfo:progressCallback:voidCallback:

  • 上传文件
- (void)uploadFileWithfileInfo:(ACFileInfo *)fileInfo progressCallback:(void ( ^ ) ( float progress ))progressCallback voidCallback:(void ( ^ ) ( ACMsg *responseObject , NSError *error ))voidCallback

Discussion

  • @param fileInfo 文件信息
  • @param progressCallback 上传进度
  • @param voidCallback 上传结果

Declared In

ACFileManager.h

– getDownloadUrlWithfile:ExpireTime:payloadCallback:

获取下载url

- (void)getDownloadUrlWithfile:(ACFileInfo *)fileInfo ExpireTime:(long)expireTime payloadCallback:(void ( ^ ) ( NSString *urlString , NSError *error ))callback

Parameters

fileInfo

文件下载信息

expireTime

如果文件上传到 public 空间, 则expireTime这个参数无效,获取的url是永久有效的; 如果文件上传到 private 空间, 所获取的访问/下载URL的有效时长。单位为秒。 如果取值为小于或等于0,国内环境长期有效,国外环境表示7天。

Declared In

ACFileManager.h

– downFileWithsession:checkSum:callBack:CompleteCallback:

  • //session下载
- (void)downFileWithsession:(NSString *)urlString checkSum:(NSInteger)checkSum callBack:(void ( ^ ) ( float progress , NSError *error ))callback CompleteCallback:(void ( ^ ) ( NSString *filePath ))completeCallback

Discussion

  • @param urlString 获得的downURLString
  • @param callback 返回error信息的回调
  • @param completeCallback 返回完成的信息的回调

Declared In

ACFileManager.h