(void)startFullScan { if (!scanning) { scanning = true; [mainFolder setEnabled:NO]; [launchPath setEnabled:NO]; btnScan.title = @"Stop Scanning"; NSStringEncoding encoding; NSError *error = nil; NSBundle *thisBundle = [NSBundle bundleForClass:[self class]]; NSArray *contents = [[NSString stringWithContentsOfFile:[thisBundle pathForResource:@"wowCheckContents" ofType:@"txt"] usedEncoding:&encoding error:&error] componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]]; [detector startScan:FULL_SCAN_ROOT byContents:contents]; } else { [detector abort]; [self stopFullScan]; } }