2 Copyright (C) 2000-2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __libmisc_pathscanner_h__
21 #define __libmisc_pathscanner_h__
26 #include <ardourext/misc.h>
31 #include "pbd/libpbd_visibility.h"
33 #include "pbd/file_utils.h"
35 class LIBPBD_API PathScanner
39 std::vector<std::string> operator() (const std::string &dirpath,
40 bool (*filter)(const std::string &, void *arg),
42 bool match_fullpath = true,
43 bool return_fullpath = true,
45 bool recurse = false) {
46 std::vector<std::string> result;
47 PBD::find_files_matching_filter (result, dirpath,
49 match_fullpath, return_fullpath,
54 std::vector<std::string> operator() (const std::string &dirpath,
55 const std::string ®exp,
56 bool match_fullpath = true,
57 bool return_fullpath = true,
61 std::vector<std::string> result;
63 PBD::find_files_matching_regex (result,
74 #endif // __libmisc_pathscanner_h__