All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
filesystemDiscoveryHelpers.h File Reference

Provides utilities that the default filesystem discovery plugin uses. More...

+ Include dependency graph for filesystemDiscoveryHelpers.h:

Go to the source code of this file.

Functions

NDR_API NdrNodeDiscoveryResultVec NdrFsHelpersDiscoverNodes (const NdrStringVec &searchPaths, const NdrStringVec &allowedExtensions, bool followSymlinks=true, const NdrDiscoveryPluginContext *context=nullptr)
 Walks the specified search paths, optionally following symlinks. More...
 

Detailed Description

Provides utilities that the default filesystem discovery plugin uses.

If a custom filesystem discovery plugin is needed, these can be used to fill in a large chunk of the functionality.

Definition in file filesystemDiscoveryHelpers.h.

Function Documentation

NDR_API NdrNodeDiscoveryResultVec NdrFsHelpersDiscoverNodes ( const NdrStringVec &  searchPaths,
const NdrStringVec &  allowedExtensions,
bool  followSymlinks = true,
const NdrDiscoveryPluginContext context = nullptr 
)

Walks the specified search paths, optionally following symlinks.

Paths are walked recursively, and each directory has FsHelpersExamineFiles() called on it. Only files that match one of the provided extensions (case insensitive) are candidates for being turned into NdrDiscoveryResults. Returns a vector of discovery results that have been found while walking the search paths. In each result the name and identifier will be the same, the version will be invalid and default, and the family will be empty. The caller is expected to adjust these as appropriate. A naive client with no versions and no family will work correctly.