array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'function.posix-fpathconf.php', 1 => 'posix_fpathconf', 2 => 'Returns the value of a configurable limit', ), 'up' => array ( 0 => 'ref.posix.php', 1 => 'POSIX Funzioni', ), 'prev' => array ( 0 => 'function.posix-errno.php', 1 => 'posix_errno', ), 'next' => array ( 0 => 'function.posix-get-last-error.php', 1 => 'posix_get_last_error', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/posix/functions/posix-fpathconf.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

posix_fpathconf

(PHP 8 >= 8.3.0)

posix_fpathconfReturns the value of a configurable limit

Descrizione

posix_fpathconf(resource|int $file_descriptor, int $name): int|false

Returns the value of a configurable limit from name for file_descriptor.

Elenco dei parametri

file_descriptor

The file descriptor, which is expected to be either a file resource or an int. An int will be assumed to be a file descriptor that can be passed directly to the underlying system call.

name

The name of the configurable limit, one of the following. POSIX_PC_LINK_MAX, POSIX_PC_MAX_CANON, POSIX_PC_MAX_INPUT, POSIX_PC_NAME_MAX, POSIX_PC_PATH_MAX, POSIX_PC_PIPE_BUF, POSIX_PC_CHOWN_RESTRICTED, POSIX_PC_NO_TRUNC, POSIX_PC_ALLOC_SIZE_MIN, POSIX_PC_SYMLINK_MAX.

Valori restituiti

Returns the configurable limit or false.

Errori/Eccezioni

Throws a ValueError when resource is invalid.

Esempi

Example #1 posix_fpathconf() example

This example will get the max path name's length in bytes for the current dir.

<?php
$fd
= fopen(__DIR__, "r");
echo
posix_fpathconf($fd, POSIX_PC_PATH_MAX);
?>

Il precedente esempio visualizzerĂ :

4096

Vedere anche: