Changeset 1191 for trunk/src/find_imadoc.m
- Timestamp:
- Feb 6, 2026, 5:13:05 PM (2 weeks ago)
- File:
-
- 1 edited
-
trunk/src/find_imadoc.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_imadoc.m
r1156 r1191 2 2 % take into account the old conventions 3 3 %----------------------------------------------------------------------- 4 % function XmlFileName=find_imadoc(RootPath,SubDir)4 % function {[XmlFileName,Rank]=find_imadoc(RootPath,SubDir) 5 5 % 6 6 % OUTPUT: 7 % XmlFileName: name of the xml file, ='' if none is found 7 % XmlFileName: name of the xml file, if the SubDir has suffixes marked with 8 % '.', take the first one going backward, ='' isf no xml file is found 9 % Rank: = nbre of suffixes in SubDir 8 10 % 9 11 % INPUT: … … 29 31 %======================================================================= 30 32 31 function XmlFileName=find_imadoc(RootPath,SubDir)33 function [XmlFileName,Rank]=find_imadoc(RootPath,SubDir) 32 34 XmlFileName=fullfile(RootPath,[SubDir '.xml']); 35 Rank=0; 33 36 if ~exist(XmlFileName,'file') 34 37 dotchar=regexp(SubDir,'\.');%detect the dots in the folder name … … 38 41 XmlFileName=fullfile(RootPath,[SubDir '.xml']); 39 42 if exist(XmlFileName,'file') 40 break 43 Rank=idot; 44 break % take the root name after removing all the dot suffixes 41 45 end 42 46 end
Note: See TracChangeset
for help on using the changeset viewer.
