<?xml version="1.0" encoding="utf-8"?>
<refentry xml:id="function.posix-fpathconf" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>posix_fpathconf</refname>
  <refpurpose>Returns the value of a configurable limit</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type class="union"><type>int</type><type>false</type></type><methodname>posix_fpathconf</methodname>
   <methodparam><type class="union"><type>resource</type><type>int</type></type><parameter>file_descriptor</parameter></methodparam>
   <methodparam><type>int</type><parameter>name</parameter></methodparam>
  </methodsynopsis>
  <para>
   Returns the value of a configurable limit from <parameter>name</parameter> for a file descriptor <parameter>resource</parameter>
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    &posix.parameter.fd;
    <varlistentry>
     <term><parameter>name</parameter></term>
     <listitem>
      <para>
       The name of the configurable limit, one of the following.
       <constant>POSIX_PC_LINK_MAX</constant>, <constant>POSIX_PC_MAX_CANON</constant>
       <constant>POSIX_PC_MAX_INPUT</constant>, <constant>POSIX_PC_NAME_MAX</constant>
       <constant>POSIX_PC_PATH_MAX</constant>, <constant>POSIX_PC_PIPE_BUF</constant>
       <constant>POSIX_PC_CHOWN_RESTRICTED</constant>, <constant>POSIX_PC_NO_TRUNC</constant>
       <constant>POSIX_PC_ALLOC_SIZE_MIN</constant>, <constant>POSIX_PC_SYMLINK_MAX</constant>
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the configurable limit or &false;.
  </para>
 </refsect1>

 <refsect1 role="errors">
  &reftitle.errors;
  <para>
   Throws a <classname>ValueError</classname>
   when <parameter>resource</parameter> is invalid.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <example xml:id="function.posix-fpathconf.example.basic">
   <title><function>posix_fpathconf</function> example</title>
   <para>
    This example will get the max path name's length in bytes
    for the current dir.
   </para>
   <programlisting role="php">
<![CDATA[
<?php
$fd = fopen(__DIR__, "r");
echo posix_fpathconf($fd, POSIX_PC_PATH_MAX);
?>
]]>
   </programlisting>
   &example.outputs;
   <screen>
<![CDATA[
4096
]]>
   </screen>
  </example>
 </refsect1>

 <refsect1 role="notes">
  &reftitle.notes;
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <simplelist>
   <member><function>posix_pathconf</function></member>
  </simplelist>
 </refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
