function varargout = getSourcePaths(h, replaceMatlabroot, varargin)
% GETSOURCEPATHS The getSourcePaths function returns the names of source
% paths stored in the model's build information. Use the
% replaceMatlabroot argument to control whether the function sources your
% MATLAB root definition in the output it returns. Using optional
% includeGroups and excludeGroups arguments, you can selectively source or
% exclude groups of source paths the function returns.
%
% Argument description
% buildinfo Build information handle returned by RTW.Buildinfo.
%
% replaceMatlabroot if true replaces the token $(MATLAB_ROOT) with the absolute
% path string for your MATLAB installation directory.
%
% includeGroups (optional) A character array or cell array of character
% arrays that specifies groups of source paths you want
% the function to return.
%
% excludeGroups (optional) A character array or cell array of character
% array that specifies groups of source paths you do not
% want the function to return.
%
% Return values
% the function returns the source paths stored in the model's build
% information.
%
% example 1:
% myModelBuildInfo = RTW.BuildInfo;
% addSourcePaths(myModelBuildInfo, ...
% {'/etc/proj/etclib' '/proj/etc/etcbld' '/common/lib'},...
% {'etc' 'etc' 'shared'});
% srcpaths = getSourcePaths(myModelBuildInfo, true, 'etc');
%
% resulting values:
% srcpaths == {'/etc/proj/etclib' '/proj/etc/etcbld'}
%
% Please refer to the documentation for more information.
%

% Copyright 2005-2019 The MathWorks, Inc.

% redirect call to generic method
[varargin{:}] = convertStringsToChars(varargin{:});
[varargout{1:nargout}] = h.getPaths('source', replaceMatlabroot, varargin{:});