return_single_list - return a single list of directories and files names of a specified directory
[tt,path] = return_single_list(path)
- path : vector of strings. a directories list
- tt : list.
- tt() : id the of the directory
- tt()() :
- tt()(1) : string. the name of the directory
- tt()(2) : vector of strings. the list of the files
- tt()(3) : vector of strings. the list of absolute path
- path : vector of strings. the list of absolute path of sub-adjacent directories.
//return_single_list
//Entrée path : un vecteur de chaîne de caractère de nom de chemin de taille n
//Sortie tt une liste
// tt()(1) le nom du répertoire examiné
// tt()(2) la liste des fichiers
// tt()(3) la liste des chemins absolus
// ex : ['/home/man';'/home/macros']
//path : la liste de tous les répertoires sous adjacents aux repertoires
// du vecteur d'entrée (chemins absolus)
function [tt,path]=return_single_list(path)
tt=return_dir_list(path);
MORE=%F;
for j=1:size(tt)
if size(tt(j)(3),1)<> 0 then MORE=%T; end;
end
if ~MORE then break; end;
path=[];
for j=1:size(tt)
if (tt(j)(3)<>[]) then
if MSDOS then
tt(j)(3)=tt(j)(1)+tt(j)(3)+'\';
else
tt(j)(3)=tt(j)(1)+tt(j)(3)+'/';
end
path=[path;tt(j)(3)];
end
end
endfunction
IRCOM Group
Alan Layec