Provides utilities that the default filesystem discovery plugin uses. More...
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... | |
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.
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 NdrDiscoveryResult
s. 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.