SplFileInfo::isReadable

(PHP 5 >= 5.1.2, PHP 7)

SplFileInfo::isReadableTells if file is readable

说锟斤拷

public SplFileInfo::isReadable ( void ) : bool

Check if the file is readable.

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

Returns TRUE if readable, FALSE otherwise.

锟斤拷锟斤拷

Example #1 SplFileInfo::isReadable() example

<?php
$info 
= new SplFileInfo(__FILE__);
var_dump($info->isReadable());

$info = new SplFileInfo('foo');
var_dump($info->isReadable());
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

bool(true)
bool(false)