btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / text_search / FileIterator.h
blob4d1cca57222fd511c8922535593aa1a73187e2f0
1 /*
2 * Copyright (c) 2008 Stephan Aßmus <superstippi@gmx.de>
3 * Copyright (c) 1998-2007 Matthijs Hollemans
4 * All rights reserved. Distributed under the terms of the MIT License.
5 */
6 #ifndef FILE_ITERATOR_H
7 #define FILE_ITERATOR_H
9 class BEntry;
11 // Provides an interface to retrieve the next file that should be grepped
12 // for the search string.
13 class FileIterator {
14 public:
15 FileIterator();
16 virtual ~FileIterator();
18 virtual bool IsValid() const = 0;
20 // Returns the full path name of the next file.
21 virtual bool GetNextName(char* buffer) = 0;
23 // Tells the Grepper whether the targets wants to know about negative hits.
24 virtual bool NotifyNegatives() const = 0;
26 protected:
27 // Determines whether we can grep a file.
28 bool _ExamineFile(BEntry& entry, char* buffer,
29 bool textFilesOnly);
32 #endif // FILE_ITERATOR_H