1 /*******************************************************************************
2 ********************************************************************************
4 Copyright (c) 2008 Ahmed S. Badran
6 Licensed under the FreeBSD License (see LICENSE)
8 Filename: tree_builder.h
9 Description: A tree builder, returns a tree filtered by patterns.
10 Created: 08/23/2008 07:22:19 PM PDT
11 Author: Ahmed S. Badran (Ahmed B.), ahmed.badran@gmail.com
13 ********************************************************************************
14 *******************************************************************************/
15 #ifndef TREE_BUILDER_INC
16 #define TREE_BUILDER_INC
23 static tree_builder
* get_instance();
24 fs_item
* build(const std::string
& path
, const
25 std::vector
<std::string
>& patterns
,
26 std::vector
<std::string
>* file_list
) const;
30 static tree_builder
* instance
;
31 void build_dir_tree(const std::string
& path
, fs_item
* dir_item
, const
32 std::vector
<std::string
>& patterns
,
33 std::vector
<std::string
>* file_list
) const;
34 bool matches(const char*, const std::vector
<std::string
>& patterns
)
37 #endif // ----- #ifndef TREE_BUILDER_INC -----