Skip to content

Instantly share code, notes, and snippets.

@zigdanis
Created April 2, 2014 08:15
Show Gist options
  • Save zigdanis/9930023 to your computer and use it in GitHub Desktop.
Save zigdanis/9930023 to your computer and use it in GitHub Desktop.
- (void)loadFile:(void (^)(NSURL *))finish
{
if (!fileExistToPath(self.pathToLocalFile))
{
self.loadFileHandler = finish;
[self.restClient loadFile:self.dropboxFile.path atRev:self.dropboxFile.rev intoPath:self.pathToLocalFile];
}
else
{
NSURL *urlLocalPath = [NSURL fileURLWithPath:self.pathToLocalFile];
BLOCK_SAFE_RUN(finish, urlLocalPath);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment