Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6166815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:24:14+00:00 2026-05-23T22:24:14+00:00

Hello I am using dropbox api and displaying meta data from dropbox account.. I

  • 0

Hello I am using dropbox api and displaying meta data from dropbox account..

I want to differentiate files and folders from loaded data..because I want to show next level if there is folder and if there is file I don’t want to show next View

my code to load data

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

    [self.metaArray release];
    self.metaArray = [[NSMutableArray alloc]init ];

    for (DBMetadata *child in metadata.contents) {

        NSString *folderName = [[child.path pathComponents] lastObject];
        [self.metaArray addObject:folderName];



    }



    [self.tableView reloadData];
    [self.activityIndicator stopAnimating];


}

Like this

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:24:14+00:00Added an answer on May 23, 2026 at 10:24 pm

    According to the Dropbox Developer Docs the metadata includes a property called is_dir which should allow you to determine whether the particular item is a directory or not.

    Looking at the header of DBMetaData it is indeed exposed as a property

    @property (nonatomic, readonly) BOOL isDirectory;
    

    So you can just do a simple test like so

    - (void)restClient:(DBRestClient*)client loadedMetadata:(DBMetadata*)metadata
    {
        if (metadata.isDirectory) {
            // handle directory here
        } else {
            // handle file here
        }
    }
    

    With regards pushing views based on whether or not an entry is a directory, you could subclass UITableViewCell and add an isDirectory property. Instead of adding just the name to self.metaArray you could add a dictionary containing both the name and the value of isDirectory. Then in your table view datasource where you populate the cells you’d set the isDirectory property of the UITableViewCell based on the same property in the appropriate dictionary from the array. Finally, in the table view delegate method

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

    you can get the selected cell using the indexPath and then test the isDirectory property and based on it’s value take the appropriate action.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I am using core data in my application, and want to set ID
Hello i am making an iphone app using the dropbox sdk and i want
Hello Im using OLE DB Source for get rows from a dBase IV file
Hello I am using jquery layout plugin from http://layout.jquery-dev.net/ . my options are following:
I'm using the Hello World with Ant tutorial from the Ant manual to learn
Hello I am using PHP to allow users to upload files and I have
Hello I am using admobs sdk in iphone. I want to show ads in
Hello there im trying to send files using client-server classes in java. For some
Hello guys i have a problem streaming PDF files with php, i'm using this
Would it be possible to print Hello twice using single condition ? if condition

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.