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

109 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 871a231f4a1caa5fb258ae53b1bb7d1fb2a0f949 Maintainer: shein Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.filesize" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>filesize</refname>
<refpurpose>Возвращает размер файла</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>int</type><type>false</type></type><methodname>filesize</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
Возвращает размер указанного файла.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
Путь к файлу.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает размер указанного файла в байтах или &false;
генерирует ошибку уровня <constant>E_WARNING</constant>)
в случае возникновения ошибки.
</para>
&fs.file.32bit;
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
&fs.emits.warning.on.failure;
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования функции <function>filesize</function></title>
<programlisting role="php">
<![CDATA[
<?php
// Пример вывода: Размер файла somefile.txt: 1024 байтов
$filename = 'somefile.txt';
echo 'Размер файла ' . $filename . ': ' . filesize($filename) . ' байтов';
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&note.clearstatcache;
&tip.fopen-wrapper.stat;
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>file_exists</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
-->