dropbox不断创建冲突副本ios sdk(核心api)

时间:2014-04-18 05:53:46

标签: ios dropbox-api

NSString *filename = @"NotesDBNew.sqlite"; //File name in DropBox
NSString *destDir = @"/"; //Destination path in DropBox
NSString *fromPath = @"..."; //local path to your DB file

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docsPath = [paths objectAtIndex:0];
fromPath = [docsPath stringByAppendingPathComponent:@"NotesDBNew.sqlite"];
for (DBMetadata *child in metadata.contents) {
   // NSString *folderName = [[child.path pathComponents] lastObject];
    if ([child.filename isEqualToString:filename]) {
        NSLog(@"%@",child.filename);
        NSString *strqwe=child.rev;
        [[self restClient] uploadFile:filename toPath:destDir withParentRev:strqwe fromPath:fromPath];
    }
}

0 个答案:

没有答案