www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.file.listdir fix

I rewrote this function and added:

1) overloaded to accept a callback delegate instead of constructing a
possibly huge array.
2) implemented linux version.

This attached code is donated to the origional author of file.d and can have
the same license.

--
Christopher E. Miller


begin 666 listdir.txt
M=F5R<VEO;BA7:6XS,BD-"GL-" EV;VED(&QI<W1D:7(H8VAA<EM=('!A=&AN
M86UE+"!B;V]L(&1E;&5G871E*&-H87);72!F:6QE;F%M92D 8V%L;&)A8VLI



M<G-T1FEL95<H<W1D+G5T9BYT;U541C$V>BAP871H;F%M92DL("9F9&%T82D[


M9B A<W1D+G-T<FEN9RYW8W-C;7 H9F1A=&$N8T9I;&5.86UE+" B+B(I('Q\


M/2!S=&0N<W1R:6YG+G=C<VQE;BAF9&%T82YC1FEL94YA;64I.PT*"0D)"0DO
M+R!!<W-U;65S('1O551&." I(')E='5R;G, 82!N97< 8G5F9F5R+ T*"0D)
M"0EI9B A8V%L;&)A8VLH<W1D+G5T9BYT;U541C H9F1A=&$N8T9I;&5.86UE




M=&AN86UE*2P )F9D871A*3L-" D)"6EF*$E.5D%,241?2$%.1$Q%7U9!3%5%


M1FEL94YA;64L("(N(BD ?'P-" D)"0D)"2%S=&0N<W1R:6YG+G-T<F-M<"AF
M9&%T82YC1FEL94YA;64L("(N+B(I*0T*"0D)"0D)"6-O;G1I;G5E.PT*"0D)
M"0D-" D)"0D):6YT(&QE;B ]('-T9"YS=')I;F<N<W1R;&5N*&9D871A+F-&


M;&4H1FEN9$YE>'1&:6QE02AH+" F9F1A=&$I*3L-" D)"0E&:6YD0VQO<V4H

M+R\ 5&AI<R!S:&]U;&0 8F4 861D960 =&\ <W1D+V,O;&EN=7 O9&ER96YT


M7V]F9CL-" D)"75S:&]R="!D7W)E8VQE;CL-" D)"75B>71E(&1?='EP93L-


M"0E$25(J(&]P96YD:7(H8VAA<BH ;F%M92D[("\O(%)E='5R;G, ;G5L;"!O
M;B!F86EL=7)E+ T*"0EI;G0 8VQO<V5D:7(H1$E2*B!D:7(I.R O+R!2971U

M96%D9&ER*$1)4BH 9&ER*3L +R\ 4F5T=7)N<R!N=6QL(&EF(&5R<F]R(&]R
M($5/1BX-" D)=F]I9"!R97=I;F1D:7(H1$E2*B!D:7(I.R O+R!';R!B86-K

M1$E2*B!D:7(I.R O+R!2971U<FYS(&-U<G)E;G0 ;&]C871I;VXL(&]R("TQ
M(&EF(&5R<F]R+ T*"0EV;VED('-E96MD:7(H1$E2*B!D:7(L(&]F9E]T(&]F

M?0T*"0T*"0T*"79O:60 ;&ES=&1I<BAC:&%R6UT <&%T:&YA;64L(&)O;VP 

M4BH :#L-

M9F1A=&$ /2!R96%D9&ER*& I*2 A/2!N=6QL*0T*"0D)>PT*"0D)"2\O(%-K

M871A+F1?;F%M92P (BXB*2!\? T*"0D)"0DA<W1D+G-T<FEN9RYS=')C;7 H
M9F1A=&$N9%]N86UE+" B+BXB*2D-" D)"0D)"6-O;G1I;G5E.PT*"0D)"0T*
M"0D)"6EN="!L96X /2!S=&0N<W1R:6YG+G-T<FQE;BAF9&%T82YD7VYA;64I
M.PT*"0D)"6EF*"%C86QL8F%C:RAF9&%T82YD7VYA;65;," N+B!L96Y=+F1U




M"7)E='5R;B!T<G5E.R O+R!C;VYT:6YU90T*"7T-" D-" D-" EL:7-T9&ER




`
end
May 08 2004