Tells if the entry is writable

# SplFileInfo::isWritable

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

SplFileInfo::isWritable — Tells if the entry is writable

### 说明

public function SplFileInfo::isWritable(): bool

Checks if the current entry is writable.

### 参数

此函数没有参数。

### 返回值

Returns `true` if writable, `false` otherwise;

### 示例

示例 #1 SplFileInfo::isWritable() example

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

以上示例的输出类似于：

    locked.jpg is not writable

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open