home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / CLIPPER / ISDIR / ISDIR.PRG
Text File  |  1993-09-18  |  545b  |  33 lines

  1. /* ISDIR.PRG */
  2.  
  3. // much to my delight, also works on SUBST-ed drives, at least under
  4. // DOS 6.
  5.  
  6. #include "ftint86.ch"
  7.  
  8. #define DOS          33
  9. #define FindFirst    78
  10.  
  11. #ifdef FT_TEST
  12.  
  13. function test( cDir )
  14. qout( ft_isdir(cDir) )
  15. return nil
  16.  
  17. #endif
  18.  
  19.  
  20. FUNCTION FT_ISDIR( cDir )
  21. LOCAL aRegs[ 10 ]
  22.  
  23. IIF( !(Right(cDir,1)=="\"),cDir+= "\", )
  24.  
  25. aRegs[ AX ] := makehi( FindFirst )
  26. aRegs[ DS ] := cDir + "*.*" + chr( 0 )
  27. aRegs[ DX ] := REG_DS
  28. aRegs[ CX ] := 63
  29.  
  30. FT_Int86( DOS, aRegs )
  31.  
  32. RETURN ( aRegs[ FLAGS ] % 2 == 0 )
  33.