home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
clarion
/
readdir.zip
/
READDIR.COM
/
READDIR.CLA
< prev
next >
Wrap
Text File
|
1989-12-19
|
3KB
|
116 lines
PROGRAM
MAP
MODULE('READDIR'),BINARY
PROC(FINDFIRST)
PROC(FINDNEXT)
. .
Screen SCREEN WINDOW(25,80),HUE(7,0),PRE(Scr)
ROW(1,6) PAINT(25,70),HUE(7,1)
COL(6) STRING('╔═{12}╤═{11}╤════<0{11}>' |
& '════╤═══╤═══╤═══╤═══╤═══╤═══╗'),ENH
ROW(2,6) REPEAT(23)
STRING('║<0{12}>│<0{11}>│<0{11}>│<0{7}>│<0{3}>' |
& '│<0{3}>│<0{3}>│<0{3}>│<0{3}>│<0{3}>║'),ENH .
ROW(25,6) STRING('╚═{12}╧═{11}╧═{11}╧═{7}╧═══╧═══╧═══╧═══╧═══╧'|
& '═══╝'),ENH
ROW(1,36) STRING(' Directory '),HUE(0,3)
ROW(2,11) STRING('Name'),HUE(11,1)
COL(24) STRING('Size'),HUE(11,1)
COL(36) STRING('Date'),HUE(11,1)
COL(46) STRING('Time'),HUE(11,1)
COL(52) STRING('R/O'),HUE(11,1)
COL(56) STRING('Hid'),HUE(11,1)
COL(60) STRING('Sys'),HUE(11,1)
COL(64) STRING('Lbl'),HUE(11,1)
COL(68) STRING('Dir'),HUE(11,1)
COL(72) STRING('Arc'),HUE(11,1)
REPEAT(22),INDEX(Idx)
FileName ROW(3,7) STRING(12)
FileSize COL(20) STRING(@N11)
Date COL(32) STRING(@D3)
Time COL(44) STRING(@T3)
ReadOnly COL(53) STRING(1)
Hidden COL(57) STRING(1)
System COL(61) STRING(1)
Label COL(65) STRING(1)
Directory COL(69) STRING(1)
Archive COL(73) STRING(1)
.
ROW(25,35) PAUSE(' Press a key '),HUE(0,3)
.
DirEntry GROUP,PRE(Dir)
Attributes GROUP
ReadOnly BYTE
Hidden BYTE
System BYTE
Label BYTE
Directory BYTE
Archive BYTE
.
Time LONG
Date LONG
FileSize LONG
FileName STRING(12)
.
Idx BYTE
CODE
OPEN(Screen)
Idx = 1
ALERT(0,999)
FindFirst('*.*', DirEntry)
LOOP UNTIL ERROR()
IF Idx = 23
ACCEPT
DO BlankIt
Idx = 1
.
DO ShowIt
FindNext(DirEntry)
Idx += 1
.
ACCEPT
BlankIt ROUTINE
BLANK(ROW(Scr:FileName) ,COL(Scr:FileName) , 1, SIZE(Scr:FileName) )
BLANK(ROW(Scr:FileSize) ,COL(Scr:FileSize) , 1, SIZE(Scr:FileSize) )
BLANK(ROW(Scr:Date) ,COL(Scr:Date) , 1, SIZE(Scr:Date) )
BLANK(ROW(Scr:Time) ,COL(Scr:Time) , 1, SIZE(Scr:Time) )
BLANK(ROW(Scr:ReadOnly) ,COL(Scr:ReadOnly) , 1, SIZE(Scr:ReadOnly) )
BLANK(ROW(Scr:Hidden) ,COL(Scr:Hidden) , 1, SIZE(Scr:Hidden) )
BLANK(ROW(Scr:System) ,COL(Scr:System) , 1, SIZE(Scr:System) )
BLANK(ROW(Scr:Label) ,COL(Scr:Label) , 1, SIZE(Scr:Label) )
BLANK(ROW(Scr:Directory),COL(Scr:Directory), 1, SIZE(Scr:Directory) )
BLANK(ROW(Scr:Archive) ,COL(Scr:Archive) , 1, SIZE(Scr:Archive) )
ShowIt ROUTINE
Scr:FileName = Dir:FileName
Scr:FileSize = Dir:FileSize
Scr:Date = Dir:Date
Scr:Time = Dir:Time
IF Dir:ReadOnly
Scr:ReadOnly = '*'
.
IF Dir:Hidden
Scr:Hidden = '*'
.
IF Dir:System
Scr:System = '*'
.
IF Dir:Label
Scr:Label = '*'
.
IF Dir:Directory
Scr:Directory = '*'
.
IF Dir:Archive
Scr:Archive = '*'
.