PHP 8.3.4 Released!

SplFileInfo::isReadable

(PHP 5 >= 5.1.2, PHP 7, PHP 8)

SplFileInfo::isReadableIndica se o arquivo é legível

Descrição

public SplFileInfo::isReadable(): bool

Verifica se o arquivo é legível.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

Retorna true se legível, false caso contrário.

Exemplos

Exemplo #1 Exemplo de SplFileInfo::isReadable()

<?php
$info
= new SplFileInfo('readable.jpg');
if (
$info->isReadable()) {
echo
$info->getFilename() . ' is readable';
}
?>

O exemplo acima produzirá algo semelhante a:

readable.jpg is readable

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top