Files
harbour-core/harbour/tests/dirtest.prg
Viktor Szakats 9f0c672127 2012-07-19 11:28 UTC+0200 Viktor Szakats (harbour syenar.net)
* tests/cursrtst.prg
  * tests/db_brows.prg
  * tests/debugtst.prg
  * tests/dirtest.prg
  * tests/foreach.prg
  * tests/funcarr.prg
  * tests/memvar.prg
  * tests/objarr.prg
  * tests/onidle.prg
  * tests/speedstr.prg
  * tests/speedtst.prg
  * tests/switch.prg
  * tests/testdbf.prg
  * tests/testdecl.prg
  * tests/testget.prg
    * formatting
2012-07-19 09:29:56 +00:00

33 lines
754 B
Plaintext

/*
* $Id$
*/
// directory test
#include "directry.ch"
PROCEDURE Main( filespec, attribs, cshort )
LOCAL aDir := {}
LOCAL x := 0, lShort := .F.
IF ! cshort == NIL .AND. ( Upper( cShort ) == "TRUE" .OR. Upper( cShort ) == ".T." )
lShort := .T.
ENDIF
// aDir := ASort( Directory( filespec, attribs, lShort ),,, {| x, y | Upper( x[ F_NAME ] ) < Upper( y[ F_NAME ] ) } )
aDir := Directory( filespec, attribs, lShort )
SET CENTURY ON
FOR x := 1 TO Len( aDir )
OutStd( hb_eol() )
OutStd( PadR( aDir[ x, F_NAME ], 20 ), "|", ;
Transform( aDir[ x, F_SIZE ], "9,999,999,999" ), "|", ;
aDir[ x, F_DATE ], "|", ;
aDir[ x, F_TIME ], "|", ;
aDir[ x, F_ATTR ] )
NEXT
RETURN