Changeset 1076 for trunk/src/browse_data.m
- Timestamp:
- Jan 24, 2020, 8:26:09 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/browse_data.m
r1071 r1076 76 76 set(hObject, 'Position', FigPos); 77 77 set(hObject, 'Units', OldUnits); 78 % if exist('MultiDevices','var') && strcmp(MultiDevices,'on')79 % set(handles.DataSeries,'Max',2)80 % else81 % set(handles.DataSeries,'Max',1)82 % end83 78 if exist('EnableMirror','var') && strcmp(EnableMirror,'on') 84 79 set(handles.CreateMirror,'Visible','on') … … 113 108 end 114 109 s=[]; 115 % if exist(RootXml,'file')116 % [s,Heading]=xml2struct(RootXml);%read the xml file117 % if isfield(s,'SourceDir')118 % set(handles.SourceDir,'String',s.SourceDir);%display the source dir if a mirror has been opened119 % set(handles.MirrorDir,'Visible','on');% mirror dir display120 % set(handles.MirrorDir,'String',Campaign);%display the opened mirror dir121 % set(handles.CreateMirror,'String','update_mirror')122 % end123 % end124 110 if isempty(s) %a source dir has been opened 125 111 set(handles.SourceDir,'String',SourceDir{1}); … … 355 341 ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray 356 342 ListFiles=ListCells(1,:); 357 check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files 343 index_isdir=find(strcmp('isdir',fieldnames(ListStruct))); 344 check_dir=cell2mat(ListCells(index_isdir,:));% =1 for directories, =0 for files 358 345 ListFiles(check_dir)=regexprep(ListFiles(check_dir),'^.+','+/$0');% put '+/' in front of dir name display 359 346 cell_remove=regexp(ListFiles,'^(-|\.|\+/\.)');% detect strings beginning by '-' ,'.' or '+/.'(dir beginning by . ) … … 383 370 ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray 384 371 ListFiles=ListCells(1,:); 385 check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files 372 index_isdir=find(strcmp('isdir',fieldnames(ListStruct))); 373 check_dir=cell2mat(ListCells(index_isdir,:));% =1 for directories, =0 for files 386 374 ListFiles(check_dir)=regexprep(ListFiles(check_dir),'^.+','+/$0');% put '+/' in front of dir name display 387 375 cell_remove=regexp(ListFiles,'^(-|\.|\+/\.)');% detect strings beginning by '-' ,'.' or '+/.'(dir beginning by . ) … … 430 418 ListFiles=ListCells(1,:); 431 419 check_xml=~cellfun('isempty',regexp(ListFiles,'(\.xml|~)$'));% detect non xml files and files not marked by ~ 432 check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files 420 index_isdir=find(strcmp('isdir',fieldnames(ListStruct))); 421 check_dir=cell2mat(ListCells(index_isdir,:));% =1 for directories, =0 for files 433 422 nbfiles=numel(find(~check_xml & ~check_dir));% number of non xml files 434 423 check_dir=check_dir & cellfun('isempty', regexp(ListFiles,'^(-|\.|\+/\.)'));% detect strings beginning by '-' ,'.' or '+/.'(dir beginning by . ) … … 481 470 cell_remove=regexp(ListFiles,'^(-|\.|\+/\.)');% detect strings beginning by '-' ,'.' or '+/.'(dir beginning by . ) 482 471 check_keep=cellfun('isempty', cell_remove); 483 check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files 472 index_isdir=find(strcmp('isdir',fieldnames(ListStruct))); 473 check_dir=cell2mat(ListCells(index_isdir,:));% =1 for directories, =0 for files 484 474 for ilist=1:numel(ListFiles) 485 475 if check_keep(ilist)% loop on eligible DataSeries folders
Note: See TracChangeset
for help on using the changeset viewer.