home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
CLIPPER
/
ISDIR
/
ISDIR.PRG
Wrap
Text File
|
1993-09-18
|
545b
|
33 lines
/* ISDIR.PRG */
// much to my delight, also works on SUBST-ed drives, at least under
// DOS 6.
#include "ftint86.ch"
#define DOS 33
#define FindFirst 78
#ifdef FT_TEST
function test( cDir )
qout( ft_isdir(cDir) )
return nil
#endif
FUNCTION FT_ISDIR( cDir )
LOCAL aRegs[ 10 ]
IIF( !(Right(cDir,1)=="\"),cDir+= "\", )
aRegs[ AX ] := makehi( FindFirst )
aRegs[ DS ] := cDir + "*.*" + chr( 0 )
aRegs[ DX ] := REG_DS
aRegs[ CX ] := 63
FT_Int86( DOS, aRegs )
RETURN ( aRegs[ FLAGS ] % 2 == 0 )