read access ..., write access ...

Prev Next

Function Names

read access, read access repeat if locked, write access, write access repeat if locked

Description

These functions checks the access rights for the specified path and directory or file name.

The functions ending with repeat if locked allows you to close the file open in a different application, then continue by pushing [Enter]. Some applications use file access control to temporarily lock access from other applications.

Call as: procedure or function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

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

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

Return value

TypeDescription
boolean Result

true if read / write access is given, otherwise false

Examples

               echo( read accessible  ( "C:\Program Files" ) );
               echo( write accessible ( "C:\Program Files\B4P\B4P.exe" ) );
               directory create( Test Dir );
               echo( read accessible  ( Test Dir ) );
               echo( write accessible ( Test Dir ) );
               directory delete( Test Dir );

Output

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