index

Varkon MBS Programmers manual


test_file - Function

Description

Checks the existence and permissions of a named file.

Syntax

  status:=test_file(name, mode);

  int status;
  string name;
  string mode;

Principal parameters

name - Name (including optional path) of file to test
mode - What to test
   "X" = Does the file exist ?
   "R" = Do I have permission to open the file for reading ?
   "W" = Do I have permission to open the file for writing ?

Optional parameters

None.

Return value

An INT value = 1 if the answer is yes or = 0 if the answer is no.

Comments

Mode codes may be upper or lower case.

Write permission is needed to delete or rename a file.

See also

iostat()


SourceForge.net Logo

Varkon 1.19D svn # 120M