file_exists Checks whether a file or directory exists &reftitle.description; boolfile_exists stringfilename Checks whether a file or directory exists. &reftitle.parameters; filename Path to the file or directory. On windows, use //computername/share/filename or \\computername\share\filename to check files on network shares. &reftitle.returnvalues; Returns &true; if the file or directory specified by filename exists; &false; otherwise. This function will return &false; for symlinks pointing to non-existing files. This function returns &false; for files inaccessible due to safe mode restrictions. However these files still can be included if they are located in safe_mode_include_dir. The check is done using the real UID/GID instead of the effective one. &fs.file.32bit; &reftitle.examples; Testing whether a file exists ]]> &reftitle.errors; &fs.emits.warning.on.failure; &reftitle.notes; ¬e.clearstatcache; &tip.fopen-wrapper.stat; &reftitle.seealso; is_readable is_writable is_file file