Files
php-doc-ru/reference/filesystem/functions/linkinfo.xml
Sergey Panteleev 6d43fd64d7 Исправление форматирования
[skip-spellcheck]
[skip-lint]
2022-12-27 03:42:36 +03:00

104 lines
3.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: shein Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.linkinfo" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>linkinfo</refname>
<refpurpose>Возвращает информацию о ссылке</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>int</type><type>false</type></type><methodname>linkinfo</methodname>
<methodparam><type>string</type><parameter>path</parameter></methodparam>
</methodsynopsis>
<para>
Возвращает информацию о ссылке.
</para>
<para>
Эта функция используется для определения, существует ли ссылка
(на которую указывает <parameter>path</parameter>)
на самом деле (используя тот же метод, что и макрос S_ISLNK,
определённый в <filename>stat.h</filename>).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>path</parameter></term>
<listitem>
<para>
Путь к ссылке.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<function>linkinfo</function> возвращает поле <literal>st_dev</literal>
структуры stat из Unix C, которую возвращает системный вызов
<literal>lstat</literal>.
Возвращает неотрицательное целое число в случае успешного выполнения, -1 в случае, если ссылка не была найдена,
или &false; в случае возникновения ошибки open.base_dir.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования функции <function>linkinfo</function></title>
<programlisting role="php">
<![CDATA[
<?php
echo linkinfo('/vmlinuz'); // 835
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>symlink</function></member>
<member><function>link</function></member>
<member><function>readlink</function></member>
</simplelist>
</para>
</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
-->