Skip to content

Instantly share code, notes, and snippets.

@danielctull
Created August 18, 2013 15:51
Show Gist options
  • Save danielctull/6262336 to your computer and use it in GitHub Desktop.
Save danielctull/6262336 to your computer and use it in GitHub Desktop.
@protocol SnapshotCancellation
- (void)cancel;
@end
+ (id<SnapshotCancellation>)snapshotOfFolder:(NSString*)folder withBlock:(void(^)(Snapshot* shot))block {
Snapshot* s = [[Snapshot alloc] initWithFolder:folder];
[s scanWithCompletion:block];
return s;
}
- (void)cancel {
[self cancelScan];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment