简体   繁体   English

列出iPhone中Dropbox中的所有CSV文件

[英]List all CSV files from Dropbox in iphone

In my app, I am integrating the drop box. 在我的应用中,我正在集成投币箱。 For this, I want to display the all csv files which are in any folder. 为此,我想显示任何文件夹中的所有csv文件。

Right Now, I did like: The csv files which are only in app folder are displayed. 现在,我确实喜欢:仅显示app文件夹中的csv文件。

[[self restClient] loadMetadata:@"/"];

#pragma mark DBRestClientDelegate methods

- (void)restClient:(DBRestClient*)client loadedMetadata:(DBMetadata*)metadata {

    NSArray* validExtensions = [NSArray arrayWithObjects:@"csv",nil];
    NSMutableArray* newPhotoPaths = [NSMutableArray new];
    for (DBMetadata* child in metadata.contents) {
        NSString* extension = [[child.path pathExtension] lowercaseString];
        if (!child.isDirectory && [validExtensions indexOfObject:extension] != NSNotFound) {

            // [files addObject:[child.path lastPathComponent]];
            [files addObject:child.path];
            [newPhotoPaths addObject:child.path];
        }
    }

    NSLog(@"%@",files);
    [tbl reloadData];

}

Dropbox apps have a setting which allows them to only access the app folder OR have access to the users entire Dropbox. Dropbox应用程序具有一项设置,允许他们仅访问应用程序文件夹或访问用户整个Dropbox。 Change this setting from the API page and it should work 从API页面更改此设置,它应该可以工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM