Home > functions > internal > unit-test > dsUnitGetAutogenFiles.m

dsUnitGetAutogenFiles

PURPOSE ^

GETAUTOGENFILES returns cell list of autogen files

SYNOPSIS ^

function [ files ] = dsUnitGetAutogenFiles( localfn_flag, query_flag )

DESCRIPTION ^

GETAUTOGENFILES returns cell list of autogen files

 Inputs:
   localfn_flag: if true, only returns local function files. if false, does not
                 return local fn files. Default: false;
   query_flag: whether to use query variable from base

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ files ] = dsUnitGetAutogenFiles( localfn_flag, query_flag )
0002 %GETAUTOGENFILES returns cell list of autogen files
0003 %
0004 % Inputs:
0005 %   localfn_flag: if true, only returns local function files. if false, does not
0006 %                 return local fn files. Default: false;
0007 %   query_flag: whether to use query variable from base
0008 
0009 if ~exist('localfn_flag','var')
0010   localfn_flag = false;
0011 end
0012 if ~exist('query_flag','var')
0013   query_flag = false;
0014 end
0015 
0016 if ~query_flag
0017   files = lscell(fullfile(dsGetConfig('ds_unitTestData_path'), 'autogen'));
0018 else
0019   files = lscell(fullfile(dsGetConfig('ds_unitTestData_path'), 'autogen', ['*' evalin('base','query') '*']));
0020 end
0021 
0022 if localfn_flag
0023   files = files( ~cellfun(@isempty,regexp(files,'__')) );
0024 else
0025   files = files( cellfun(@isempty,regexp(files,'__')) );
0026 end
0027 
0028 end

Generated on Tue 12-Dec-2017 11:32:10 by m2html © 2005