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

SplFileInfo::isWritableTells if the entry is writable


public SplFileInfo::isWritable(): bool

Checks if the current entry is writable.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns true if writable, false otherwise;


Example #1 SplFileInfo::isWriteable() example

= new SplFileInfo('locked.jpg');
if (!
$info->isWriteable()) {
$info->getFilename() . ' is not writeable';

Il precedente esempio visualizzerĂ  qualcosa simile a:

locked.jpg is not writeable

add a note add a note

User Contributed Notes

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