Operator Reference

file_existsfile_existsFileExistsFileExistsfile_exists (Operator)

file_existsfile_existsFileExistsFileExistsfile_exists — Check whether file exists.

Signature

file_exists( : : FileName : FileExists)

Herror file_exists(const char* FileName, Hlong* FileExists)

Herror T_file_exists(const Htuple FileName, Htuple* FileExists)

void FileExists(const HTuple& FileName, HTuple* FileExists)

static Hlong HMisc::FileExists(const HString& FileName)

static Hlong HMisc::FileExists(const char* FileName)

static Hlong HMisc::FileExists(const wchar_t* FileName)   ( Windows only)

static void HOperatorSet.FileExists(HTuple fileName, out HTuple fileExists)

static int HMisc.FileExists(string fileName)

def file_exists(file_name: str) -> int

Description

The operator file_existsfile_existsFileExistsFileExistsfile_exists checks whether the indicated file already exists. If this is the case, the parameter FileExistsFileExistsFileExistsfileExistsfile_exists is set to TRUE, otherwise to FALSE.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

FileNameFileNameFileNamefileNamefile_name (input_control)  filename HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of file to be checked.

Default: '/bin/cc' "/bin/cc" "/bin/cc" "/bin/cc" "/bin/cc"

FileExistsFileExistsFileExistsfileExistsfile_exists (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Boolean number.

Result

If the parameters are correct the operator file_existsfile_existsFileExistsFileExistsfile_exists returns the value 2 ( H_MSG_TRUE) . Otherwise, an exception is raised.

Possible Successors

open_fileopen_fileOpenFileOpenFileopen_file

Alternatives

open_fileopen_fileOpenFileOpenFileopen_file

Module

Foundation