Skip to content

file_existsFileExistsFileExistsfile_existsfile_exists🔗

Short description🔗

file_existsFileExistsFileExistsfile_existsfile_exists — Check whether file exists.

Signature🔗

file_exists( filename FileName, out integer FileExists )void FileExists( const HTuple& FileName, HTuple* FileExists )static void HOperatorSet.FileExists( HTuple fileName, out HTuple fileExists )def file_exists( file_name: str ) -> int

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

Herror T_file_exists( 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 int HMisc.FileExists( string fileName )

Description🔗

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

Execution information🔗

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🔗

FileNamefileNamefile_name (input_control) filename → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of file to be checked.

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

FileExistsfileExistsfile_exists (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Boolean number.

Result🔗

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

Combinations with other operators🔗

Combinations

Possible successors

open_fileOpenFile

Alternatives

open_fileOpenFile

Module🔗

Foundation