module documentation

Undocumented

Function find_in_workspaces Find all paths which match the search criteria.
Function _get_valid_search_dirs Compare param collection of search dirs with valid names, raises ValueError if invalid.
def find_in_workspaces(search_dirs=None, project=None, path=None, _workspaces=None, considered_paths=None, first_matching_workspace_only=False, first_match_only=False, workspace_to_source_spaces=None, source_path_to_packages=None):

Find all paths which match the search criteria.

All workspaces are searched in order. Each workspace, each search_in subfolder, the project name and the path are concatenated to define a candidate path. If the candidate path exists it is appended to the result list. Note: the search might return multiple paths for 'share' from devel- and source-space.

Parameters
search_dirsUndocumented
projectThe project name to search for (optional, not possible with the global search_in folders 'bin' and 'lib'), str
pathThe path, str
_workspaces(optional, used for unit tests), the list of workspaces to use.
considered_pathsIf not None, function will append all path that were searched
first_matching_workspace_onlyif True returns all results found for first workspace with results
first_match_onlyif True returns first path found (supercedes first_matching_workspace_only)
workspace_to_source_spacesthe dictionary is populated with mappings from workspaces to source paths, pass in the same dictionary to avoid repeated reading of the catkin marker file
source_path_to_packagesthe dictionary is populated with mappings from source paths to packages, pass in the same dictionary to avoid repeated crawling
search_dirThe list of subfolders to search in (default contains all valid values: 'bin', 'etc', 'lib', 'libexec', 'share'), list
Returns
List of paths
Raises
ValueErrorif search_dirs contains an invalid folder name
def _get_valid_search_dirs(search_dirs, project):

Compare param collection of search dirs with valid names, raises ValueError if invalid.

Maintains the order of param if any. If project is given other names are allowed than without.

Parameters
search_dirscollection of foldernames (basename) to search for
projectthe project to search in or None
Raises
Unknown exceptionValueError