(PHP 5 >= 5.1.2, PHP 7, PHP 8)
SplFileInfo::isWritable — Tells if the entry is writable
Questa funzione non contiene parametri.
Returns true
if writable, false
otherwise;
Example #1 SplFileInfo::isWriteable() example
<?php
$info = new SplFileInfo('locked.jpg');
if (!$info->isWriteable()) {
echo $info->getFilename() . ' is not writeable';
}
?>
Il precedente esempio visualizzerĂ qualcosa simile a:
locked.jpg is not writeable