Syntax
IsDir( cDirSpec ) --> lIsDirectoryArguments
cDirSpec
A directory name, or a mask with * and ?.
Return value
.T. when the first entry found is a directory, otherwise .F.
Description
IsDir() is the same function as IsDirectory(). See there.
Example
PROCEDURE Main()
DirMake( "isdir-demo" )
MemoWrit( "isdir-file.txt", "text", .F. )
Check( 'IsDir() of a directory ', IsDir( "isdir-demo" ), .T. )
Check( 'IsDir() of a file ', IsDir( "isdir-file.txt" ), .F. )
FErase( "isdir-file.txt" )
DirRemove( "isdir-demo" )
RETURN
STATIC PROCEDURE Check( cTitle, xResult, xExpected )
QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )
RETURNOutput
IsDir() of a directory OK
IsDir() of a file OK