svn: /phpdoc/en/trunk/ language-snippets.ent reference/filesystem/functions/file-exists.xml reference/filesystem/functions/filesize.xml
reference/filesystem/functions/is-file.xml reference/filesystem/functions/realpath.xml reference/filesystem/functions/stat.xml

From: Date: Sat, 08 Oct 2011 22:33:42 +0000
Subject: svn: /phpdoc/en/trunk/ language-snippets.ent reference/filesystem/functions/file-exists.xml reference/filesystem/functions/filesize.xml
reference/filesystem/functions/is-file.xml reference/filesystem/functions/realpath.xml reference/filesystem/functions/stat.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-8914@lists.php.net to get a copy of this message
frozenfire Sat, 08 Oct 2011 22:33:42 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=317928 Log: Added language snippet note regarding the 32bit integer limit causing weird results for files over 2GB. Changed paths: U phpdoc/en/trunk/language-snippets.ent U phpdoc/en/trunk/reference/filesystem/functions/file-exists.xml U phpdoc/en/trunk/reference/filesystem/functions/filesize.xml U phpdoc/en/trunk/reference/filesystem/functions/is-file.xml U phpdoc/en/trunk/reference/filesystem/functions/realpath.xml U phpdoc/en/trunk/reference/filesystem/functions/stat.xml Modified: phpdoc/en/trunk/language-snippets.ent =================================================================== --- phpdoc/en/trunk/language-snippets.ent 2011-10-08 22:27:48 UTC (rev 317927) +++ phpdoc/en/trunk/language-snippets.ent 2011-10-08 22:33:42 UTC (rev 317928) @@ -584,6 +584,12 @@ <!ENTITY fs.file.pointer '<para xmlns="http://docbook.org/ns/docbook">A file system pointer <type>resource</type> that is typically created using <function>fopen</function>.</para>'> +<!ENTITY fs.file.32bit '<note xmlns="http://docbook.org/ns/docbook"><simpara> + Because PHP&apos;s integer type is signed and many platforms use 32bit integers, + some filesystem functions may return unexpected results for files which + are larger than 2GB. + </simpara></note>'> + <!-- GNUPG --> <!ENTITY gnupg.identifier '<para xmlns="http://docbook.org/ns/docbook">The gnupg identifier, from a call to <function>gnupg_init</function> or <classname>gnupg</classname>.</para>'> Modified: phpdoc/en/trunk/reference/filesystem/functions/file-exists.xml =================================================================== --- phpdoc/en/trunk/reference/filesystem/functions/file-exists.xml 2011-10-08 22:27:48 UTC (rev 317927) +++ phpdoc/en/trunk/reference/filesystem/functions/file-exists.xml 2011-10-08 22:33:42 UTC (rev 317928) @@ -64,6 +64,7 @@ The check is done using the real UID/GID instead of the effective one. </para> </note> + &fs.file.32bit; </refsect1> <refsect1 role="examples"> Modified: phpdoc/en/trunk/reference/filesystem/functions/filesize.xml =================================================================== --- phpdoc/en/trunk/reference/filesystem/functions/filesize.xml 2011-10-08 22:27:48 UTC (rev 317927) +++ phpdoc/en/trunk/reference/filesystem/functions/filesize.xml 2011-10-08 22:33:42 UTC (rev 317928) @@ -39,14 +39,7 @@ Returns the size of the file in bytes, or &false; (and generates an error of level <constant>E_WARNING</constant>) in case of an error. </para> - <note> - <simpara> - Because PHP's integer type is signed and many platforms use 32bit integers, - <function>filesize</function> may return unexpected results for files which - are larger than 2GB. For files between 2GB and 4GB in size this can usually - be overcome by using <literal>sprintf("%u", filesize($file))</literal>. - </simpara> - </note> + &fs.file.32bit; </refsect1> <refsect1 role="examples"> Modified: phpdoc/en/trunk/reference/filesystem/functions/is-file.xml =================================================================== --- phpdoc/en/trunk/reference/filesystem/functions/is-file.xml 2011-10-08 22:27:48 UTC (rev 317927) +++ phpdoc/en/trunk/reference/filesystem/functions/is-file.xml 2011-10-08 22:33:42 UTC (rev 317928) @@ -39,6 +39,7 @@ Returns &true; if the filename exists and is a regular file, &false; otherwise. </para> + &fs.file.32bit; </refsect1> <refsect1 role="examples"> Modified: phpdoc/en/trunk/reference/filesystem/functions/realpath.xml =================================================================== --- phpdoc/en/trunk/reference/filesystem/functions/realpath.xml 2011-10-08 22:27:48 UTC (rev 317927) +++ phpdoc/en/trunk/reference/filesystem/functions/realpath.xml 2011-10-08 22:33:42 UTC (rev 317928) @@ -59,6 +59,7 @@ &false;. </para> </note> + &fs.file.32bit; </refsect1> <refsect1 role="changelog"> Modified: phpdoc/en/trunk/reference/filesystem/functions/stat.xml =================================================================== --- phpdoc/en/trunk/reference/filesystem/functions/stat.xml 2011-10-08 22:27:48 UTC (rev 317927) +++ phpdoc/en/trunk/reference/filesystem/functions/stat.xml 2011-10-08 22:33:42 UTC (rev 317928) @@ -131,6 +131,7 @@ <para> In case of error, <function>stat</function> returns &false;. </para> + &fs.file.32bit; </refsect1> <refsect1 role="errors">

« previous php.doc.cvs (#8914) next »