#include <unixstl/filesystem/glob_sequence.hpp>
This class presents and STL-like readonly sequence interface to allow the iteration over the results of file-system wildcard matches.
Public Types | |
Member Constants | |
enum | search_flags { includeDots = 0x0008, directories = 0x0010, files = 0x0020, noSort = 0x0100, markDirs = 0x0200, absolutePath = 0x0400, breakOnError = 0x0800, noEscape = 0x1000 } |
Types | |
typedef glob_sequence | class_type |
This class. | |
typedef char | char_type |
The char type. | |
typedef filesystem_traits < char_type > | traits_type |
typedef char_type const * | value_type |
The value type. | |
typedef value_type const & | const_reference |
The non-mutating (const) reference type. | |
typedef value_type const * | const_pointer |
The non-mutating (const) pointer type. | |
typedef size_t | size_type |
The size type. | |
typedef us_ptrdiff_t | difference_type |
The difference type. | |
typedef stlsoft::allocator_selector < value_type >::allocator_type | allocator_type |
The allocator type. | |
typedef stlsoft::pointer_iterator < value_type const , const_pointer, const_reference >::type | const_iterator |
The non-mutating (const) iterator type. | |
Public Member Functions | |
Construction | |
template<typename S> | |
glob_sequence (S const &pattern, int flags=noSort) | |
Constructs a sequence according to the given criteria. | |
template<typename S1, typename S2> | |
glob_sequence (S1 const &directory, S2 const &pattern, int flags=noSort) | |
Constructs a sequence according to the given criteria. | |
~glob_sequence () throw () | |
Releases any acquired resources. | |
Attributes | |
size_t | size () const |
Returns the number of elements in the sequence. | |
bool | empty () const |
Indicates whether the search sequence is empty. | |
Element Access | |
const_reference | operator[] (size_type index) const |
Returns the value corresponding to the given index. | |
Iteration | |
const_iterator | begin () const |
Begins the iteration. | |
const_iterator | end () const |
Ends the iteration. |
typedef glob_sequence class_type |
This class.
typedef char char_type |
The char type.
typedef char_type const* value_type |
The value type.
typedef value_type const& const_reference |
The non-mutating (const) reference type.
typedef value_type const* const_pointer |
The non-mutating (const) pointer type.
typedef size_t size_type |
The size type.
typedef us_ptrdiff_t difference_type |
The difference type.
typedef stlsoft:: allocator_selector<value_type>::allocator_type allocator_type |
The allocator type.
typedef stlsoft:: pointer_iterator< value_type const , const_pointer , const_reference >::type const_iterator |
The non-mutating (const) iterator type.
enum search_flags |
glob_sequence | ( | S const & | pattern, | |
int | flags = noSort | |||
) | [inline, explicit] |
Constructs a sequence according to the given criteria.
The constructor initialises a glob_sequence instance on the given pattern with the given flags.
pattern | The pattern against which to match the file-system contents | |
flags | Flags to alter the behaviour of the search |
References unixstl::c_str_ptr(), stlsoft_ns_qual, and UNIXSTL_ASSERT.
glob_sequence | ( | S1 const & | directory, | |
S2 const & | pattern, | |||
int | flags = noSort | |||
) | [inline] |
Constructs a sequence according to the given criteria.
The constructor initialises a glob_sequence instance on the given pattern with the given flags.
directory | The directory in which the pattern is located | |
pattern | The pattern against which to match the file-system contents | |
flags | Flags to alter the behaviour of the search |
References unixstl::c_str_ptr(), stlsoft_ns_qual, and UNIXSTL_ASSERT.
~glob_sequence | ( | ) | throw () |
Releases any acquired resources.
size_t size | ( | ) | const |
Returns the number of elements in the sequence.
bool empty | ( | ) | const |
Indicates whether the search sequence is empty.
const_reference operator[] | ( | size_type | index | ) | const |
Returns the value corresponding to the given index.
const_iterator begin | ( | ) | const |
Begins the iteration.
const_iterator end | ( | ) | const |
Ends the iteration.