Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

posix_pathconf

Description

The posix_pathconf of POSIX for PHP returns the value of a configurable limit.

Syntax

posix_pathconf(
    string $path,
    int $name
): int|false

Parameters

path

The name of the file whose limit you want to get.

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, and POSIX_PC_SYMLINK_MAX.

Return

Returns the configurable limit or false.

Examples

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_LINK_MAX;

$return = posix_pathconf($path, $name);

echo $return;

?>
65000

2 · path name · POSIX_PC_MAX_CANON

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_MAX_CANON;

$return = posix_pathconf($path, $name);

echo $return;

?>
255

3 · path name · POSIX_PC_MAX_INPUT

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_MAX_INPUT;

$return = posix_pathconf($path, $name);

echo $return;

?>
255

4 · path name · POSIX_PC_NAME_MAX

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_NAME_MAX;

$return = posix_pathconf($path, $name);

echo $return;

?>
255

5 · path name · POSIX_PC_PATH_MAX

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_PATH_MAX;

$return = posix_pathconf($path, $name);

echo $return;

?>
4096

6 · path name · POSIX_PC_PIPE_BUF

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_PIPE_BUF;

$return = posix_pathconf($path, $name);

echo $return;

?>
4096

7 · path name · POSIX_PC_CHOWN_RESTRICTED

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_CHOWN_RESTRICTED;

$return = posix_pathconf($path, $name);

echo $return;

?>
1

8 · path name · POSIX_PC_NO_TRUNC

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_NO_TRUNC;

$return = posix_pathconf($path, $name);

echo $return;

?>
1

9 · path name · POSIX_PC_ALLOC_SIZE_MIN

<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_ALLOC_SIZE_MIN;

$return = posix_pathconf($path, $name);

echo $return;

?>
4096
<?

$path = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$name = POSIX_PC_SYMLINK_MAX;

$return = posix_pathconf($path, $name);

echo $return;

?>
HomeMenu