check_LUKE_filenames_yp

PURPOSE ^

LUKE - check the compatibility of LUKE file names for buiding the LUKE help

SYNOPSIS ^

function not_compatible_filename_list = check_LUKE_filenames_yp(dirName)

DESCRIPTION ^

LUKE - check the compatibility of LUKE file names for buiding the LUKE help

 Check the compatibility of LUKE file names for buiding the LUKE help

 INPUTS: 

   - dirName: directory path [string]

 OUTPUTS:

   - not_compatible_filename_list: A list of non compatible file names and their corresponding path

 by Y.Peysson CEA-IRFM <yves.peysson@cea.fr> and Joan Decker CEA-IRFM (joan.decker@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function not_compatible_filename_list = check_LUKE_filenames_yp(dirName)
0002 %LUKE - check the compatibility of LUKE file names for buiding the LUKE help
0003 %
0004 % Check the compatibility of LUKE file names for buiding the LUKE help
0005 %
0006 % INPUTS:
0007 %
0008 %   - dirName: directory path [string]
0009 %
0010 % OUTPUTS:
0011 %
0012 %   - not_compatible_filename_list: A list of non compatible file names and their corresponding path
0013 %
0014 % by Y.Peysson CEA-IRFM <yves.peysson@cea.fr> and Joan Decker CEA-IRFM (joan.decker@cea.fr)
0015 %
0016 if nargin == 0,
0017     dirName = pwd; 
0018 end
0019 %
0020 filelist = get_all_filesname_yp(dirName);
0021 not_compatible_filename_list = {};
0022 %
0023 j = 1;
0024 %
0025 if ~isempty(filelist),
0026     for i = 1:length(filelist),
0027         %
0028         fs = strfind(filelist{i},filesep);
0029         filename = filelist{i}(fs(end)+1:end);
0030         dirname = filelist{i}(1:fs(end));
0031         %
0032         fd = strfind(filename,'.');
0033         %
0034         if ~isempty(fd),
0035             fext = ['.',filename(fd(end)+1:end)];
0036             filename = filename(1:fd(end)-1);
0037         else
0038             fext = '';
0039         end
0040         %
0041         if strcmp(fext,'.m') || strcmp(fext,'.c') || strcmp(fext,'.f') || strcmp(fext,'.f90') || strcmp(fext,'.h') || strcmp(fext,'.cpp'),
0042             if strfind(filename,'-'),
0043                 not_compatible_filename_list{j} = ['The name of the file ''',filename,fext,''' in the directory ''',dirname,''' is not compatible to build the LUKE help (No ''-'' is allowed).'];
0044                 j = j+1;
0045             end
0046         end
0047 
0048     end
0049 end
0050 
0051 
0052 
0053 
0054

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.