Skip to content

Rose::FileSystem::findNames

Entries within a directory.

Synopsis

Declared in <src/Rose/FileSystem.h>

template<class Select>
std::vector<Path>
findNames(
    Path const& root,
    Select select);

Description

Returns a list of entries in a directory‐‐the contents of a directory‐‐without recursing into subdirectories. The return value is a sorted list of paths, each of which contains root as a prefix. If a select predicate is supplied then only paths for which the predicate returns true become part of the return value. The predicate is called with the path that would become part of the return value. The root itself is never returned and never tested by the predicate.

If select is not specified then all entries are returned.

@{

Return Value

Sorted list of matching paths.

Parameters

Name

Description

root

Directory to search.

select

Predicate to include paths.

Created with MrDocs