PHP 8.1.28 Released!

SplFileInfo::getPerms

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

SplFileInfo::getPermsGets file permissions

Açıklama

public SplFileInfo::getPerms(): int|false

Gets the file permissions for the file.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Returns the file permissions on success, or false on failure.

Örnekler

Örnek 1 SplFileInfo::getPerms() example

<?php
$info
= new SplFileInfo('/tmp');
echo
substr(sprintf('%o', $info->getPerms()), -4);

$info = new SplFileInfo(__FILE__);
echo
substr(sprintf('%o', $info->getPerms()), -4);
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

1777
0644

add a note

User Contributed Notes

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