(PHP 8 >= 8.3.0)
posix_pathconf — Returns the value of a configurable limit
本函数还未编写文档,仅有参数列表。
Returns the value of a configurable limit from name
for a path
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
, POSIX_PC_SYMLINK_MAX
.
Returns the configurable limit or false
.
Throws a ValueError
when path
is empty.
示例 #1 posix_pathconf() example
This example will get the max path name's length in bytes for the tmp dir.
<?php
echo posix_pathconf(sys_get_temp_dir(), POSIX_PC_PATH_MAX);
?>
以上示例会输出:
4096
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant