other versions
- jessie 3.23.01-1
- stretch 4.04.00-1
- testing 4.08.06-1
- unstable 4.08.06-1
- experimental 4.09.00-1
other sections
FBB::Glob(3bobcat) | Files matching a pattern | FBB::Glob(3bobcat) |
NAME¶
FBB::Glob - Wrapper around glob(3) to find files matching a patternSYNOPSIS¶
#include <bobcat/glob>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¶
FBBINHERITS FROM¶
-ENUMERATIONS¶
Glob::Type:- o
- BLOCK_DEVICE: the object represents a block device
- o
- CHARACTER_DEVICE: the object represents a character device
- o
- DIRECTORY: the object represents a directory
- o
- FIFO: the object represents a named pipe (a queue)
- o
- REGULAR_FILE: the object represents a regular file
- o
- SOCKET: the object represents a socket
- o
- SYMBOLIC_LINK: the object represents a symbolic link
- o
- ANY: any of the above types
- o
- ERR: Return on read errors;
- o
- MARK: Append a slash to each name.
- o
- NOSORT: Don’t sort the names.
- o
- NOESCAPE: Backslashes don’t quote metacharacters.
- o
- PERIOD: Leading .-characters can be matched by metachars (i.e., * and ?).
- o
- FIRST: Filenames starting with a dot will be listed first. Within this set and in the leftover-set the relative ordering is maintained.
- o
- DEFAULT: Return filenames as they appear in the globbing process.
CONSTRUCTORS¶
- o
- Glob(std::string const &pattern = "*", int flags =
PERIOD, Dots dots = FIRST):
- An Exception exception is thrown if the constructor could not properly complete it tasks.
- 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.
- o
- Glob(Type type, std::string const &pattern = "*", int
flags = PERIOD, Dots dots = FIRST):
OVERLOADED OPERATORS¶
- o
- Glob &operator=(Glob const &other):
- o
- Glob &operator=(Glob &&tmp):
- o
- char const *operator[](size_t idx) const:
MEMBER FUNCTIONS¶
- o
- void verify() const:
- o
- size_t size() const:
- o
- char const *const *begin() const:
- o
- char const *const *end() const:
- o
- void swap(Glob &other):
EXAMPLES¶
int main(int argc, char **argv) { if (argc == 1) { cout << "Provide glob-expression as 1st arg\n"; return 1; } cout << "General:\n"; Glob general; for (size_t idx = 0; idx < general.size(); idx++) cout << idx << ": " << general[idx] << endl; cout << "Pattern: " << argv[1] << "\n"; Glob pattern(argv[1], Glob::PERIOD, Glob::DEFAULT); for (size_t idx = 0; idx < pattern.size(); idx++) cout << idx << ": " << pattern[idx] << endl; return 0; }
FILES¶
bobcat/glob - defines the class interfaceSEE ALSO¶
bobcat(7), stat(3bobcat), glob(3)BUGS¶
No Reported Bugs.DISTRIBUTION FILES¶
- o
- bobcat_3.23.01-x.dsc: detached signature;
- o
- bobcat_3.23.01-x.tar.gz: source archive;
- o
- bobcat_3.23.01-x_i386.changes: change log;
- o
- libbobcat1_3.23.01-x_*.deb: debian package holding the libraries;
- o
- libbobcat1-dev_3.23.01-x_*.deb: debian package holding the libraries, headers and manual pages;
- o
- http://sourceforge.net/projects/bobcat: public archive location;
BOBCAT¶
Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’.COPYRIGHT¶
This is free software, distributed under the terms of the GNU General Public License (GPL).AUTHOR¶
Frank B. Brokken ( f.b.brokken@rug.nl).2005-2014 | libbobcat-dev_3.23.01-x.tar.gz |