0

I’m desperately searching for some simple app that searches for text strings in a specified directory of about 1000 text files. Does anyone know if such a thing exists, or has anyone ever programmed such an app?

Thanks Pankaj

pankaj
  • 7,878
  • 16
  • 69
  • 115

1 Answers1

0

I would implement the searching within an NSOperation subclass. It would use file descriptors instead of NSStrings to keep memory usage down. To perform the actual search I would implement an algorithm that doesn't require the input to be indexed, such as the Boyer–Moore string search algorithm. See Efficient way to search a stream for a string for more details.

Community
  • 1
  • 1
Benedict Cohen
  • 11,912
  • 7
  • 55
  • 67