return_dir_list - return a list of a directory content
ttl = return_dir_list(path)
- path : vector of strings. the directories to analyse.
- ttl : list.
- ttl() :
- ttl()(1) : string. the string of the absolute path
- ttl()(2) : vector of strings. name of files
- ttl()(3) : vector of strings. name of directories
//return_dir_list
//fonction qui retourne le contenu d'un répertoire
//sous formes d'une liste
//Entrée :
//path un vecteur de chaîne de caractère de chemin
//Sortie :
//ttl une liste
//ttl()(1) : le nom du chemin examiné (absolu)
//ttl()(2) : un vecteur de chaînes de caractères des noms de fichiers
//ttl()(3) : un vecteur de chaînes de caractères des noms de répertoires
// (sans chemin) (ex: ['man';'macros']
function ttl=return_dir_list(path)
ttl=list();
if path<>[] then
p=size(path,1);
for j=1:p
tt_sub=return_dir_name(path(j))
tt_fil=return_fil_name(path(j))
if MSDOS then
path(j)=pathconvert(path(j),%t,%t,'w')
else
path(j)=pathconvert(path(j),%t,%t,'u')
end
ttl(j)=list(path(j),tt_fil,tt_sub);
end
end
endfunction
IRCOM Group
Alan Layec