Changeset 1156 for trunk/src/find_imadoc.m
- Timestamp:
- Jul 8, 2024, 11:03:33 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_imadoc.m
r1152 r1156 30 30 31 31 function XmlFileName=find_imadoc(RootPath,SubDir) 32 33 dotchar=regexp(SubDir,'\.');%detect the dots in the folder name 34 if isempty(dotchar) 35 XmlFileName=fullfile(RootPath,[SubDir '.xml']);36 else %go upward to the root name, stop if an xml file already exists 37 for idot=1:numel(dotchar)38 SubDir=SubDir(1:dotchar(end-idot+1)-1);39 XmlFileName=fullfile(RootPath,[SubDir '.xml']);40 if exist(XmlFileName,'file')41 break32 XmlFileName=fullfile(RootPath,[SubDir '.xml']); 33 if ~exist(XmlFileName,'file') 34 dotchar=regexp(SubDir,'\.');%detect the dots in the folder name 35 if ~isempty(dotchar) 36 for idot=1:numel(dotchar) 37 SubDir=SubDir(1:dotchar(end-idot+1)-1); 38 XmlFileName=fullfile(RootPath,[SubDir '.xml']); 39 if exist(XmlFileName,'file') 40 break 41 end 42 42 end 43 43 end 44 end 45 if ~exist(XmlFileName,'file') 46 XmlFileName='';44 if ~exist(XmlFileName,'file') 45 XmlFileName=''; 46 end 47 47 end 48 48 49 49 50 50 51
Note: See TracChangeset
for help on using the changeset viewer.