Skip to content

Instantly share code, notes, and snippets.

@victor
Created March 10, 2009 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victor/76603 to your computer and use it in GitHub Desktop.
Save victor/76603 to your computer and use it in GitHub Desktop.
NSURLDownload * fileDownload = [[NSURLDownload alloc] initWithRequest:req delegate:self];
if (fileDownload) {
// set destination
[[NSFileManager defaultManager] createDirectoryAtPath:[filename stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:NULL];
[fileDownload setDestination:filename allowOverwrite:NO];
[fileDownload setDeletesFileUponFailure:NO];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment