Fonction Scilab
eng - fr


return_fil_name - retourne la liste des fichiers présents dans un chemin

Librairie

Séquence d'appel

tt = return_fil_name(path)

Paramètres

Description

Add here a paragraph of the function description. Other paragraph can be added

Add here a paragraph of the function description

Exemple

Add here scilab instructions and comments

Contenu du fichier


 
function tt=return_fil_name(path)
 tt=[];
 if MSDOS then
   if part(path,length(path))=='\' then
      path=part(path,1:length(path)-1);
   end
 end
 if fileinfo(path)<>[] then
   rep=pwd();
   chdir(path);

   if MSDOS then
     k=1;
     tt=[];
     str='ttf=unix_g(''dir /B'');';
     execstr(str,'errcatch');
     if ttf<>[] then
       for j=1:size(ttf,1)
         if ~isdir(ttf(j)) then 
           tt(k)=ttf(j); k=k+1;
         end
       end
     end

   else
     k=1;
     tt=[];
     str='ttf=unix_g(""ls"")';
     execstr(str,'errcatch');
     if ttf<>[] then
       for j=1:size(ttf,1)
         if ~isdir(ttf(j)) then 
           tt(k)=ttf(j); k=k+1;
         end
       end
     end
   end
 
   chdir(rep);
 end
endfunction

Fonction(s) utilisée(s)

Add here the used function name and references

Auteurs

enter here the author name Add here the author references