directory existing, file existing

Prev Next

Function Names

directory existing, file existing

Description

These functions check if the specified directory (resp. file) is existing

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
input
string path and directory / file name

If no path is specified, then the working directory is used.

Return value

TypeDescription
boolean Result

true if specified name is existing as a directory (resp. file).
false if not existing or existing as a file (resp. directory)

Examples

               echo( directory existing( "C:\Program Files" ) );
               echo( directory existing( "C:\Program Files\B4P\B4P.exe" ) );
               echo( file existing( "C:\Program Files" ) );
               echo( file existing( "C:\Program Files\B4P\B4P.exe" ) );

Output

true
false
false
true
Try it yourself: Open LIB_Function_directory_existing.b4p in B4P_Examples.zip. Decompress before use.