www.digitalmars.com         C & C++   DMDScript  

D - linux phobos 0.76 std.file.listdir

reply Ant <Ant_member pathlink.com> writes:
Here is an implementation for
linux phobos 0.76 std.file.listdir

(CONFORMING TO: SVID 3, POSIX, BSD 4.3)

Ant


begin 0644 listdir
M+RHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M*BHJ*BHJ* H *B!2971U<FX 8V]N=&5N=', ;V8 9&ER96-T;W)Y+ H *B\*
M"F5X=&5R;B`H0RD*>PH)<W1R=6-T($1)4CL*" ES=')U8W0 1&ER96YT" E[
M" D)=6EN="!D7VEN;SL*"0EU:6YT(&1?;V9F.PH)"75S:&]R="!D7W)E8VQE
M;CL*"0EC:&%R(&1?='EP93L*"0EC:&%R6S(U-ET 9%]N86UE.PDO*B!.04U%
M7TU!6"LQ(&9R;VT ;&EN=7 O;&EM:71S+F  *B\*"7T[" D*"41)4BH ;W!E
M;F1I<BAC:&%R*B!N86UE*3L*"6EN="!C;&]S961I<BA$25(J(&1I<BD[" E$
M:7)E;G0J(')E861D:7(H1$E2*B!D:7(I.PI]" IC:&%R6UU;72!L:7-T9&ER
M*&-H87);72!P871H;F%M92D*>PH*"41I<F5N="H 96YT<GD[" E$25(J(&1I
M<B`](&]P96YD:7(H=&]3=')I;F=Z*'!A=&AN86UE*2D[" EC:&%R6UU;72!R
M97-U;'0[" EE;G1R>2`](')E861D:7(H9&ER*3L*"7=H:6QE("  96YT<GD 
M(3T](&YU;&P *0H)>PH)"0H)"6EF("  <W1D+G-T<FEN9RYS=')C;7`H96YT

M96YT<GDN9%]N86UE+"`B+BXB*2`A/2`P*0H)"7L*"0D)<F5S=6QT('X]('-T
M9"YS=')I;F<N=&]3=')I;F<H96YT<GDN9%]N86UE*2YD=7`[" D)?0H)"65N
M=')Y(#T <F5A9&1I<BAD:7(I.PH)?0H)8VQO<V5D:7(H9&ER*3L*"7)E='5R
-;B!R97-U;'0[" I]"BAD
`
end
Nov 22 2003
parent reply Ant <Ant_member pathlink.com> writes:
In article <bpo47k$4vh$1 digitaldaemon.com>, Ant says...
(CONFORMING TO: SVID 3, POSIX, BSD 4.3)
I mean the functions used. Because with declare the struct "dirent" instead of including it expect changes for other systems. (mine is linux 2.5.63) Ant
Nov 22 2003
parent reply "Walter" <walter digitalmars.com> writes:
Thanks! Legal: are you explicitly donating the code to the public domain?
Nov 22 2003
next sibling parent Ant <Ant_member pathlink.com> writes:
In article <bpodma$ib8$1 digitaldaemon.com>, Walter says...
Thanks! Legal: are you explicitly donating the code to the public domain?
Yes. Ant
Nov 22 2003
prev sibling parent Ant <Ant_member pathlink.com> writes:
In article <bpodma$ib8$1 digitaldaemon.com>, Walter says...
Thanks! Legal: are you explicitly donating the code to the public domain?
oops... If you want to use it this version is better: tests if the directory is valid before reading it... "if ( dir !== null )" no other changes. Yes, it is public domain. Ant begin 0644 listdir M+RHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ M*BHJ*BHJ* H *B!2971U<FX 8V]N=&5N=', ;V8 9&ER96-T;W)Y+ H *B\* M"F5X=&5R;B`H0RD*>PH)<W1R=6-T($1)4CL*" ES=')U8W0 1&ER96YT" E[ M" D)=6EN="!D7VEN;SL*"0EU:6YT(&1?;V9F.PH)"75S:&]R="!D7W)E8VQE M;CL*"0EC:&%R(&1?='EP93L*"0EC:&%R6S(U-ET 9%]N86UE.PDO*B!.04U% M7TU!6"LQ(&9R;VT ;&EN=7 O;&EM:71S+F *B\*"7T[" D*"41)4BH ;W!E M;F1I<BAC:&%R*B!N86UE*3L*"6EN="!C;&]S961I<BA$25(J(&1I<BD[" E$ M:7)E;G0J(')E861D:7(H1$E2*B!D:7(I.PI]" IC:&%R6UU;72!L:7-T9&ER M*&-H87);72!P871H;F%M92D*>PH*"41I<F5N="H 96YT<GD[" E$25(J(&1I M<B`](&]P96YD:7(H=&]3=')I;F=Z*'!A=&AN86UE*2D[" EC:&%R6UU;72!R M97-U;'0[" EI9B`H(&1I<B`A/3T ;G5L;"`I" E[" D)96YT<GD /2!R96%D M9&ER*&1I<BD[" D)=VAI;&4 *"!E;G1R>2`A/3T ;G5L;"`I" D)>PH)"0D* M"0D):68 *"!S=&0N<W1R:6YG+G-T<F-M<"AE;G1R>2YD7VYA;64L("(N(BD M(3T ,`H)"0D))B8 <W1D+G-T<FEN9RYS=')C;7`H96YT<GDN9%]N86UE+"`B M+BXB*2`A/2`P*0H)"0E[" D)"0ER97-U;'0 ?CT <W1D+G-T<FEN9RYT;U-T M<FEN9RAE;G1R>2YD7VYA;64I.PH)"0E]" D)"65N=')Y(#T <F5A9&1I<BAD M:7(I.PH)"7T*"0EC;&]S961I<BAD:7(I.PH)?0H)<F5T=7)N(')E<W5L=#L* ` end
Nov 22 2003