Skip to content

Instantly share code, notes, and snippets.

@rustyshelf
Last active August 29, 2015 13:56
Show Gist options
  • Save rustyshelf/8855375 to your computer and use it in GitHub Desktop.
Save rustyshelf/8855375 to your computer and use it in GitHub Desktop.
- (BOOL)__isValidResumeData:(NSData *)data{
if (!data || [data length] < 1) return NO;
NSError *error;
NSDictionary *resumeDictionary = [NSPropertyListSerialization propertyListWithData:data options:NSPropertyListImmutable format:NULL error:&error];
if (!resumeDictionary || error) return NO;
NSString *localFilePath = [resumeDictionary objectForKey:@"NSURLSessionResumeInfoLocalPath"];
if ([localFilePath length] < 1) return NO;
return [[NSFileManager defaultManager] fileExistsAtPath:localFilePath];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment