Inherits from OSSData : OSSObject : NSObject
Declared in OSSFile.h
OSSFile.m

Overview

@class

Properties

path

文件路径

@property (nonatomic, strong) NSString *path

Discussion

@property

Declared In

OSSFile.h

Instance Methods

downloadTo:error:

阻塞下载到路径toPath,error用来存放错误信息

- (void)downloadTo:(NSString *)toPath error:(NSError **)error

Discussion

@method

Declared In

OSSFile.h

downloadTo:withDownloadCallback:withProgressCallback:

非阻塞下载到路径toPath,float参数为进度信息,Bool参数表明本次操作是否成功,NSError参数为错误信息

- (void)downloadTo:(NSString *)toPath withDownloadCallback:(void ( ^ ) ( BOOL , NSError *))downloadCallback withProgressCallback:(void ( ^ ) ( float ))progressCallback

Discussion

@method

Declared In

OSSFile.h

initWithBucket:withKey:

初始化函数,bucket为数据所在的bucket,key为数据的object key

- (instancetype)initWithBucket:(OSSBucket *)bucket withKey:(NSString *)key

Discussion

@property

Declared In

OSSFile.h

resumableUploadWithCallback:withProgressCallback:

从预设路径非阻塞分块上传文件,可以实现progressCallback来访问进度

- (void)resumableUploadWithCallback:(void ( ^ ) ( BOOL , NSError *))callBack withProgressCallback:(void ( ^ ) ( float ))progressCallback

Discussion

@method

Declared In

OSSFile.h

setPath:withContentType:

设置路径path和数据的content type属性

- (void)setPath:(NSString *)path withContentType:(NSString *)type

Discussion

@method

Declared In

OSSFile.h

upload:

从预设路径阻塞上传文件,其中

- (void)upload:(NSError **)error

Discussion

@method

Declared In

OSSFile.h

uploadWithUploadCallback:withProgressCallback:

从预设非阻塞上传文件,可以实现progressCallback来访问进度

- (void)uploadWithUploadCallback:(void ( ^ ) ( BOOL , NSError *))uploadCallback withProgressCallback:(void ( ^ ) ( float ))progressCallback

Discussion

@method

Declared In

OSSFile.h