0001 function varOutput = dsGetConfig(query)
0002
0003
0004
0005
0006 dsVarsFile = fullfile(dsGetRootPath(),'dsConfig.txt');
0007
0008 if ~exist(dsVarsFile, 'file')
0009 dsMakeDefaultConfig();
0010 end
0011
0012 fid = fopen(dsVarsFile);
0013 dsVars = textscan(fid, '%s = %q');
0014 fclose(fid);
0015
0016 varCell = dsVars{2}(~cellfun(@isempty,strfind(dsVars{1}, query)));
0017
0018 if ~isempty(varCell)
0019 varOutput = varCell{1};
0020 else
0021 varOutput = [];
0022 if isempty(varOutput); warning('Requested path not found. dsConfig.txt is possibly corrupt. Try deleting dsConfig.txt and running dsMakeDefaultConfig()');
0023 end
0024
0025 end