Chapter 17. Adapting the glob API

 

Compromise and accommodation do not end with the design of hardware.

 
 --Henry Petroski
 

Being lazy may look easy, but it’s actually quite hard to pull off.

 
 --Unattributed

Introduction

In this chapter we’re going to take a look at the UNIX glob API, the first of four file system enumeration APIs that will be covered in Part II. It provides users with the capability to conduct searches using the rich wildcard matching facilities provided by the UNIX shell(s). Although the glob() function is very feature rich and comparatively complex to use compared to the other file system enumeration APIs, it presents a reasonably simple interface for STL extension, which is why we’re covering it first.

Motivation

Imagine that you ...

Get Extended STL, Volume 1: Collections and Iterators now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.