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

posix_fpathconf

Description

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

Syntax

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

Parameters

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

Return

Returns the configurable limit or false.

Examples

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_LINK_MAX;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
65000

2 · file_descriptor name · POSIX_PC_MAX_CANON

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_MAX_CANON;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
255

3 · file_descriptor name · POSIX_PC_MAX_INPUT

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_MAX_INPUT;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
255

4 · file_descriptor name · POSIX_PC_NAME_MAX

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_NAME_MAX;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
255

5 · file_descriptor name · POSIX_PC_PATH_MAX

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_PATH_MAX;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
4096

6 · file_descriptor name · POSIX_PC_PIPE_BUF

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_PIPE_BUF;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
4096

7 · file_descriptor name · POSIX_PC_CHOWN_RESTRICTED

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_CHOWN_RESTRICTED;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
1

8 · file_descriptor name · POSIX_PC_NO_TRUNC

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_NO_TRUNC;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
1

9 · file_descriptor name · POSIX_PC_ALLOC_SIZE_MIN

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_ALLOC_SIZE_MIN;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
4096
<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';
$mode = 'r';

$file_descriptor = fopen($filename, $mode);
$name = POSIX_PC_SYMLINK_MAX;

$return = posix_fpathconf($file_descriptor, $name);

echo $return;

?>
HomeMenu