changequote({,}) define({_TITLE_},{Varkon MBS Programmers manual}) define({_SUBTITLE_},{- test_file - Function}) define({_INDEXLINK_},{index}) define({_STYLE_},{../varkonstyle.css}) include(../../include/header.inc)

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()

include(../../include/svnversion.inc) include(../../include/footer.inc)