file_exists
Intervention/image
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks whether a file or directory exists
file_exists
(
string $filename
):
bool
protected function
hasApplicableFontFile
()
{
if (
is_string
(
$this
->
file
)) {
return
file_exists
(
$this
->
file
);
}
return
false
;
src/Intervention/Image/AbstractFont.php
$this
->
extension
=
array_key_exists
(
'extension'
,
$info
) ?
$info
[
'extension'
] :
null
;
$this
->
filename
=
array_key_exists
(
'filename'
,
$info
) ?
$info
[
'filename'
] :
null
;
if (
file_exists
(
$path
) &&
is_file
(
$path
)) {
$this
->
mime
=
finfo_file
(
finfo_open
(
FILEINFO_MIME_TYPE
),
$path
);
}
src/Intervention/Image/File.php
{
$path
=
$this
->
basePath
();
if (
file_exists
(
$path
) &&
is_file
(
$path
)) {
return
filesize
(
$path
);
}
src/Intervention/Image/File.php
public function
initFromPath
(
$path
)
{
if ( !
file_exists
(
$path
)) {
throw new
NotReadableException
(
"Unable to find file (
{
$path
}
)."
);
src/Intervention/Image/Gd/Decoder.php
foreach (
$config
->
get
(
'imagecache::paths'
) as
$path
) {
$image_path
=
$path
.
'/'
.
str_replace
(
'..'
,
''
,
$filename
);
if (
file_exists
(
$image_path
) &&
is_file
(
$image_path
)) {
break;
} else {
$image_path
=
false
;
src/Intervention/Image/ImageServiceProviderLaravel4.php