PHP 8.1.28 Released!

SplFileInfo::isWritable

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

SplFileInfo::isWritableTells if the entry is writable

Beschreibung

public SplFileInfo::isWritable(): bool

Checks if the current entry is writable.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

Returns true if writable, false otherwise;

Beispiele

Beispiel #1 SplFileInfo::isWriteable() example

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

locked.jpg is not writeable

add a note

User Contributed Notes

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