Back to File class

Method exists

public static bool
exists
(mixed $file)
Wrapper for the standard file_exists function
Parameters
  • string $file File path
Returns
  • bool True if path is a file
Since
  • 1.7.0
Class: File
Project: Joomla

Method exists - Source code

/**
 * Wrapper for the standard file_exists function
 *
 * @param   string  $file  File path
 *
 * @return  boolean  True if path is a file
 *
 * @since   1.7.0
 */
public static function exists($file)
{
    return is_file(Path::clean($file));
}