Take the 2-minute tour ×

Using the loadFile selector and the loadedFile delegate selector, how do I read the contents of a file which is in my application's app folder on dropbox?

Are you supposed to loadFile: intoPath: and specify an absolute path on the disk (like a tmp folder?) from which you actually read the contents after the loadedFile delegate method is called?

Does the Dropbox IOS/OSX SDK automatically determine if the file is stored locally in the users' dropbox folder, and is at the current version, before fetching and downloading the file?

Am I missing something here? Or is this the intended implementation?

Sorry for the newbish question, it just doesn't seem like there's a ton of concrete documentation on how to actually use this method.

edit (for clarification)

When I say I'd like to load the contents of the file, I want to dump the file contents into an NSString object. Sorry if that wasn't clear.

share|improve this question
we are supposed to use loadFile: intoPath: I think there is no other way to read the contents of the file.. –  Bala Jan 3 '13 at 5:20
Compare rev entries to a fresh metadata call to see if you need to pull the file again or use /delta for a list of instructions to get your local state to match Dropbox's remote state. dropbox.com/developers/reference/api#delta –  Bala Jan 3 '13 at 5:45
dropbox.com/developers/blog/23 –  Bala Jan 3 '13 at 5:52

1 Answer 1

up vote 1 down vote accepted
 NSMutableArray *tempArray =[NSMutableArray arrayWithArray:[[NSFileManager defaultManager] contentsOfDirectoryAtPath:directoryPath error:Nil]];
 NSFileManager *fileManager =[NSFileManager defaultManager];
 NSString path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
 path=[path stringByAppendingPathComponent:@"filename with extension"];

Now you can use path variable for loading file.

Have a happy Coding.!!

share|improve this answer
this is much useful thnx :) –  Naimish Karia Feb 26 '13 at 6:37
U r welcome bro.!! –  Pratik Somaiya Feb 28 '13 at 6:01

Your Answer


