Ignore:
Timestamp:
Jan 16, 2012, 12:28:26 AM (12 years ago)
Author:
sommeria
Message:

many bugs repaired.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r371 r372  
    3737%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    3838
    39 function [RootFile,i1_series,i2_series,j1_series,j2_series,NomType,FileType,Object]=find_file_series(RootPath,fileinput)
     39function [RootFile,i1_series,i2_series,j1_series,j2_series,NomType,FileType,Object]=find_file_series(RootPath,fileinput,option)
    4040%------------------------------------------------------------------------
    41 
     41if ~exist('option','var')
     42    option='all';
     43end
    4244%% get input root name and nomenclature type
    4345[tild,tild,RootFile,tild,i2_input,j1_input,j2_input,FileExt,NomType]=fileparts_uvmat(fileinput);
     
    103105end
    104106
    105 if strcmp(NomType,'')||strcmp(NomType,'*')
     107if strcmp(NomType,'')||strcmp(NomType,'*')||strcmp(option,'filetype')
    106108    if exist(fullfileinput,'file')
    107109        [tild,RootFile]=fileparts(fileinput);% case of constant name (no indexing)
     
    251253        NomType='';
    252254    else
    253         [tild,tild,tild,tild,tild,tild,tild,tild,NomType]=fileparts_uvmat(dirpair(ifile_min).name);
    254     end
     255        [tild,tild,tild,tild,tild,tild,tild,tild,NomType]=fileparts_uvmat(dirpair(ifile_min).name);% update the representation of indices (number of 0 before the number)
     256    end
     257end
     258
     259%% update the file type if the input file does not exist (pb of 0001)
     260if strcmp(option,'filetype')
     261    return
     262elseif isempty(FileType)
     263    [tild,tild, tild,tild,tild,tild,FileType,Object]=find_file_series(RootPath,dirpair(ifile_min).name,'filetype');
    255264end
    256265
Note: See TracChangeset for help on using the changeset viewer.