file_exists

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks whether a file or directory exists
<?php file_exists(string $filename): bool
<?php     public static function exists(): bool

    {

        return file_exists(ProjectPath::get().'/'.self::JSON_CONFIGURATION_NAME);

    }
<?php                 ? (self::$resolveConfigFilePathUsing)()

                : self::JSON_CONFIGURATION_NAME);



        $contents = file_exists($filePath)

            ? (string) file_get_contents($filePath)

            : '{}';
<?php     {

        $filePath = ProjectPath::get().'/'.self::JSON_CONFIGURATION_NAME;



        if (file_exists($filePath)) {

            return false;

        }
<?php         $cacheFile = $this->getCacheFile($key);



        if (! file_exists($cacheFile)) {

            return null;

        }
<?php     private static function stubExists(string $preset): bool

    {

        return file_exists(sprintf('%s/%s.stub', self::PRESET_STUBS_DIRECTORY, $preset));

    }

}