[clean-list] Directory

luciano.vieira.lima luciano.vieira.lima@terra.com.br
Thu, 12 Feb 2004 01:31:56 -0300


This is a multi-part message in MIME format.

------=_NextPart_000_0021_01C3F108.0071DB80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'd like to use the Directory module to get the directorie names that =
exist
in unother directory.
I made the following program:
=20
module diretorio
import StdEnv, Directory, StdFile
str =3D"c:\\Acrobat3"
=20
Start :: *World ->  [DirEntry]
Start env
 #((t,caminho), env) =3D pd_StringToPath str env
 #((erroDir,lst),env)=3D getDirectoryContents caminho env
 =3D lst
=20
When I run the program, I received that:
=20
[(DirEntry "." (FileInfo (PI_FileInfo 0 0 2003 6 9 2 0 1 12 True False)
(Windows
 (WindowsFileInfo 2003 6 9 2 0 1 11 2003 6 9 2 0 0 0 "" False False
False)))),(D
irEntry ".." (FileInfo (PI_FileInfo 0 0 2003 6 9 2 0 1 12 True False)
(Windows (
WindowsFileInfo 2003 6 9 2 0 1 11 2003 6 9 2 0 0 0 "" False False
False)))),(Dir
Entry "Distillr" (FileInfo (PI_FileInfo 0 0 2003 6 9 2 0 1 12 True =
False)
(Windo
ws (WindowsFileInfo 2003 6 9 2 0 1 11 2003 6 9 2 0 0 0 "DISTILLR" False
False Fa
lse)))),(DirEntry "Exchange" (FileInfo (PI_FileInfo 0 0 2003 6 9 2 0 1 =
14
True F
alse) (Windows (WindowsFileInfo 2003 6 9 2 0 1 13 2003 6 9 2 0 0 0
"EXCHANGE" Fa
lse False False))))]
=20
I don't know what kint of data type is it (Directory).
What do I have to do to receive the strings names of the directories in =
a
list?=20
The strings that follow DirEntry?
              [".","..","Distillr","Exchange"]


Lima
Aragurai-Brasil

------=_NextPart_000_0021_01C3F108.0071DB80
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3>I'd like to use=20
the Directory module to get the directorie names that exist<BR>in =
unother=20
directory.<BR>I made the following program:<BR>&nbsp;<BR>module=20
diretorio<BR>import StdEnv, Directory, StdFile<BR>str=20
=3D"c:\\Acrobat3"<BR>&nbsp;<BR>Start :: *World -&gt;&nbsp; =
[DirEntry]<BR>Start=20
env<BR>&nbsp;#((t,caminho), env) =3D pd_StringToPath str=20
env<BR>&nbsp;#((erroDir,lst),env)=3D getDirectoryContents caminho =
env<BR>&nbsp;=3D=20
lst<BR>&nbsp;<BR>When I run the program, I received=20
that:<BR>&nbsp;<BR>[(DirEntry "." (FileInfo (PI_FileInfo 0 0 2003 6 9 2 =
0 1 12=20
True False)<BR>(Windows<BR>&nbsp;(WindowsFileInfo 2003 6 9 2 0 1 11 2003 =
6 9 2 0=20
0 0 "" False False<BR>False)))),(D<BR>irEntry ".." (FileInfo =
(PI_FileInfo 0 0=20
2003 6 9 2 0 1 12 True False)<BR>(Windows (<BR>WindowsFileInfo 2003 6 9 =
2 0 1 11=20
2003 6 9 2 0 0 0 "" False False<BR>False)))),(Dir<BR>Entry "Distillr" =
(FileInfo=20
(PI_FileInfo 0 0 2003 6 9 2 0 1 12 True False)<BR>(Windo<BR>ws =
(WindowsFileInfo=20
2003 6 9 2 0 1 11 2003 6 9 2 0 0 0 "DISTILLR" False<BR>False=20
Fa<BR>lse)))),(DirEntry "Exchange" (FileInfo (PI_FileInfo 0 0 2003 6 9 2 =
0 1=20
14<BR>True F<BR>alse) (Windows (WindowsFileInfo 2003 6 9 2 0 1 13 2003 6 =
9 2 0 0=20
0<BR>"EXCHANGE" Fa<BR>lse False False))))]<BR>&nbsp;<BR>I don't know =
what kint=20
of data type is it (Directory).<BR>What do I have to do to receive the =
strings=20
names of the directories in a<BR>list? <BR>The strings that follow=20
DirEntry?<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;=20
[".","..","Distillr","Exchange"]</FONT><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Lima</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>Aragurai-Brasil</FONT></DIV></BODY></HTML>

------=_NextPart_000_0021_01C3F108.0071DB80--