../pvss.htm menu.gif basics.gif

isdir()

The function checks if a specified directory exists.

Synopsis

 bool isdir(string path);

Parameters

    Parameter

    Description

    path

    The directory path

Return value

The function returns 1 if the directory exists and 0 if it does not.

Error

-

Description

The function checks if the specified directory "test1" exists. If it does exist, the value 1 will be returned. If it does not exist, the value 0 will be returned. If the parameter would, for example, be "C://test1//test1.txt", the function would return 0 since test1.txt is a file.

IconExample

main()
{
   bool result;
   result= isdir("C://test1");
   DebugN(result);
}

Assignment

File functions

Availability

 

See also

copyFile(), moveFile(), mkdir(), rmdir(), isfile(), getExt(), delExt()

Top Of Page

 

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved