Binay, et al -- ...and then Binay said... % % Hi all,
Hiya!
%
% is there function which scans a particual directory recurisly and stores the content
in array or other way? Listing of files should be in alphabetical way and directories
should come on top.
Yep. Get the File_Find pear module and just
$find = new File_Find ;
$separate = $find->maptree(".") ;
$mixed = $find->maptreemultiple(".") ;
Now $separate looks like
Array
(
[0] =>
(
[0] => .
[1] => ./d1
),
[1] =>
(
[0] => ./f1
[1] => ./f2
[2] => ./d1/f3
)
)
and $mixed looks like
Array
(
[0] => f1
[1] => f2
[d1] =>
Array
(
[0] => f3
)
)
%
% Thanks
%
% Binay
HTH & HAND
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature

