|
FileIsExistChecks the existence of a file.
Parameters file_name [in] The name of the file being checked common_flag=0 [in] Flag determining the location of the file. If common_flag = FILE_COMMON, then the file is located in a shared folder for all client terminals \Terminal\Common\Files. Otherwise, the file is located in a local folder. Return Value Returns true, if the specified file exists. Note Checked file can turn out to be a subdirectory. In this case, FileIsExist() function will return false, while error 5019 will be logged in _LastError variable - "This is a directory, not a file" (see example for FileFindFirst() function). For security reasons, work with files is strictly controlled in the MQL4 language. Files with which file operations are conducted using MQL4 means, cannot be outside the file sandbox. If common_flag = FILE_COMMON, then the function looks for the file in a shared folder for all client terminals \Terminal\Common\Files, otherwise the function looks for a file in a local folder (MQL4\Files or MQL4\Tester\Files in the case of testing). Example:
See also |