libbobcat1-dev_2.02.03-x.tar.gz Files matching a pattern
2005-2009
NAME
FBB::Glob - Wrapper around glob(3) to find files matching a pattern
SYNOPSIS
#include <bobcat/glob>
Linking option: -lbobcat
DESCRIPTION
The FBB::Glob class is a wrapper around the C function
glob(3). It returns a list of files matching a certain pattern provided to
FBB::Glob's constructors or members.
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this
man-page, are defined in the namespace FBB.
INHERITS FROM
-
ENUMERATIONS
Flags:
ERR: Return on read errors;
MARK: Append a slash to each name.
NOSORT: Don't sort the names.
NOESCAPE: Backslashes don't quote metacharacters.
PERIOD: Leading .-characters can be matched by metachars.
Dots:
FIRST: Filenames starting with a dot will be listed first. Within
this set and in the leftover-set the relative ordering is maintained.
DEFAULT: Return filenames as they appear in the globbing process.
CONSTRUCTORS
Glob(std::string const &pattern = "*", int flags = PERIOD,
Dots dots = FIRST):
This constructor (which can also be used as the default constructor)
determines all elements in the current directory. The . and ..
relative filenames are not part of the listings. Used as default
constructor, other directory elements starting with a period will be the
first elements in the series of detected directory elements.
Multiple flags may be specified, separated by the bitor operator.
This constructor properly completes its task if only defined Flag
values were specified and if the glob(3) function returned without
errors.
The proper completion of this constructor should be checked by calling
the Glob::verify() member (see below).
The copy constructor is available.
OVERLOADED OPERATORS
Glob &operator=(Glob const &other):
The assignment operator is available.
char const *operator[](size_t idx) const:
The element at index position idx is returns as a C string. It
returns an empty string if idx is or exceeds size().
MEMBER FUNCTIONS
void verify() const:
This operator throws an Errno exception if the Glob
constructor did not properly complete. It should be called before using any
other Glob member (not required after using the copy constructor).
size_t size() const:
Returns the number of elements that were detected.
char const *const *begin() const:
Returns a pointer to the first element that was detected. This pointer
can be used in generic algorithms as an output-iterator supporting pointer
arithmetic.
char const *const *end() const:
Returns a pointer beyond the last element that was detected. This
pointer can be used in generic algorithms as an output-iterator supporting
pointer arithmetic.