ROSE  0.11.96.11
Public Member Functions | List of all members
Rose::FileSystem::baseNameMatches Class Reference

Description

Predicate returning true for matching names.

Returns true if and only if the final component of the path matches the specified regular expression.

For example, to find all files whose base name matches the glob "rose_*" use this (note that the corresponding regular expression is "rose_.*", with a dot):

using namespace Rose::FileSystem;
Path top = "/foo/bar"; // where the search starts
std::vector<Path> roseFiles = findAllNames(top, baseNameMatches(boost::regex("rose_.*")));

Definition at line 59 of file Rose/FileSystem.h.

#include <FileSystem.h>

Public Member Functions

 baseNameMatches (const boost::regex &re)
 
bool operator() (const Path &path)
 

The documentation for this class was generated from the following file:
Rose::FileSystem
Functions for operating on files in a filesystem.
Definition: Rose/FileSystem.h:18
Rose::FileSystem::Path
boost::filesystem::path Path
Name of entities in a filesystem.
Definition: Rose/FileSystem.h:24
Rose::FileSystem::baseNameMatches
Predicate returning true for matching names.
Definition: Rose/FileSystem.h:59