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

dsUnitGetAutogenDirs

PURPOSE ^

GETAUTOGENFILES returns cell list of autogen directories, for functions which write files to disk

SYNOPSIS ^

function [ files ] = dsUnitGetAutogenDirs( localfn_flag, query_flag )

DESCRIPTION ^

GETAUTOGENFILES returns cell list of autogen directories, for functions which write files to disk

 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 ] = dsUnitGetAutogenDirs( localfn_flag, query_flag )
0002 %GETAUTOGENFILES returns cell list of autogen directories, for functions which write files to disk
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'), 'autogenDirs'));
0018 else
0019   % TODO: fix this
0020   files = lscell(fullfile(dsGetConfig('ds_unitTestData_path'), 'autogenDirs', ['*' evalin('base','query') '*_autogen_*']));
0021 end
0022 
0023 if localfn_flag
0024   files = files( ~cellfun(@isempty,regexp(files,'__')) );
0025 else
0026   files = files( cellfun(@isempty,regexp(files,'__')) );
0027 end
0028 
0029 end

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