OSS iOS SDK 提供了方便的同步接口以检测 Bucket 中是否存在指定的文件。
以下代码用于判断指定文件是否存在:
NSError * error = nil;
BOOL isExist = [client doesObjectExistInBucket:TEST_BUCKET withObjectKey:@"file1m" withError:&error];
if (!error) {
if(isExist) {
NSLog(@"File exists.");
} else {
NSLog(@"File not exists.");
}
} else {
NSLog(@"Error!");
}
在文档使用中是否遇到以下问题
更多建议
匿名提交