svn: /phpdoc/en/trunk/reference/filesystem/functions/ fseek.xml

From: Date: Sat, 13 Nov 2010 15:09:52 +0000
Subject: svn: /phpdoc/en/trunk/reference/filesystem/functions/ fseek.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-7411@lists.php.net to get a copy of this message
cataphract Sat, 13 Nov 2010 15:09:52 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=305317 Log: - Behavior when seeking past the end of file. Partially addresses bug #52335. - Expanded note on how the stream may not support seeking. Bug: http://bugs.php.net/52335 (Assigned) fseek() on memory stream behavior different then file Changed paths: U phpdoc/en/trunk/reference/filesystem/functions/fseek.xml Modified: phpdoc/en/trunk/reference/filesystem/functions/fseek.xml =================================================================== --- phpdoc/en/trunk/reference/filesystem/functions/fseek.xml 2010-11-13 15:01:48 UTC (rev 305316) +++ phpdoc/en/trunk/reference/filesystem/functions/fseek.xml 2010-11-13 15:09:52 UTC (rev 305317) @@ -21,6 +21,13 @@ <parameter>offset</parameter> to the position specified by <parameter>whence</parameter>. </para> + <para> + In general, it is allowed to seek past the end-of-file; if data is then + written, reads in any unwritten region between the end-of-file and the + sought position will yield bytes with value 0. However, certain streams + may not support this behavior, especially when they have an underlying + fixed size storage. + </para> </refsect1> <refsect1 role="parameters"> @@ -67,8 +74,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Upon success, returns 0; otherwise, returns -1. Note that seeking - past EOF is not considered an error. + Upon success, returns 0; otherwise, returns -1. </para> </refsect1> @@ -109,9 +115,9 @@ </note> <note> <para> - May not be used on file pointers returned by <function>fopen</function> if - they use the <literal>http://</literal> or <literal>ftp://</literal> - schemes. + Not all streams support seeking. For those that do not support seeking, + forward seeking from the current position is accomplished by reading + and discarding data; other forms of seeking will fail. </para> </note> </refsect1>

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