diff --git a/reference/filesystem/functions/set-file-buffer.xml b/reference/filesystem/functions/set-file-buffer.xml index 0eb59ce5b2..1ca09e97a3 100644 --- a/reference/filesystem/functions/set-file-buffer.xml +++ b/reference/filesystem/functions/set-file-buffer.xml @@ -1,54 +1,16 @@ - + set_file_buffer - Sets file buffering on the given file pointer + Alias of stream_set_write_buffer Description - - intset_file_buffer - intfp - intbuffer - - Output using fwrite is normally buffered at - 8K. This means that if there are two processes wanting to write - to the same output stream (a file), each is paused after 8K of - data to allow the other to write. set_file_buffer - sets the buffering for write operations on the given filepointer - fp to buffer bytes. - If buffer is 0 then write operations are - unbuffered. This ensures that all writes with - fwrite are completed before other processes - are allowed to write to that output stream. - - - The function returns 0 on success, or EOF if the request cannot - be honored. - - - The following example demonstrates how to use - set_file_buffer to create an unbuffered stream. - - <function>set_file_buffer</function> example - - - - - - - - See also fopen, fwrite. + This function is an alias of + stream_set_write_buffer. diff --git a/reference/filesystem/functions/file-get-meta-data.xml b/reference/filesystem/functions/stream-get-meta-data.xml similarity index 97% rename from reference/filesystem/functions/file-get-meta-data.xml rename to reference/filesystem/functions/stream-get-meta-data.xml index 973fbb0844..9ac64494c4 100644 --- a/reference/filesystem/functions/file-get-meta-data.xml +++ b/reference/filesystem/functions/stream-get-meta-data.xml @@ -1,8 +1,8 @@ - + - file_get_meta_data + stream_get_meta_data Retrieves header/meta data from streams/file pointers diff --git a/reference/filesystem/functions/file-register-wrapper.xml b/reference/filesystem/functions/stream-register-wrapper.xml similarity index 96% rename from reference/filesystem/functions/file-register-wrapper.xml rename to reference/filesystem/functions/stream-register-wrapper.xml index e73396dd34..7a34ac6d43 100644 --- a/reference/filesystem/functions/file-register-wrapper.xml +++ b/reference/filesystem/functions/stream-register-wrapper.xml @@ -1,20 +1,20 @@ - + - + - file_register_wrapper + stream_register_wrapper Register a URL wrapper implemented as a PHP class Description - booleanfile_register_wrapper + booleanstream_register_wrapper stringprotocol stringclassname - file_register_wrapper allows you to implement + stream_register_wrapper allows you to implement your own protocol handlers and streams for use with all the other filesystem functions (such as fopen, fread etc.). @@ -28,7 +28,7 @@ behaviour. - file_register_wrapper will return &false; if the + stream_register_wrapper will return &false; if the protocol already has a handler. @@ -271,7 +271,7 @@ class VariableStream { } } -file_register_wrapper("var", "VariableStream") +stream_register_wrapper("var", "VariableStream") or die("Failed to register protocol"); $myvar = ""; diff --git a/reference/filesystem/functions/stream-set-write-buffer.xml b/reference/filesystem/functions/stream-set-write-buffer.xml new file mode 100644 index 0000000000..b883a1b40b --- /dev/null +++ b/reference/filesystem/functions/stream-set-write-buffer.xml @@ -0,0 +1,76 @@ + + + + + + stream_set_write_buffer + Sets file buffering on the given stream + + + Description + + intstream_set_write_buffer + resourcestream + intbuffer + + + Output using fwrite is normally buffered at + 8K. This means that if there are two processes wanting to write + to the same output stream (a file), each is paused after 8K of + data to allow the other to write. + stream_set_write_buffer + sets the buffering for write operations on the given filepointer + stream to buffer bytes. + If buffer is 0 then write operations are + unbuffered. This ensures that all writes with + fwrite are completed before other processes + are allowed to write to that output stream. + + + The function returns 0 on success, or EOF if the request cannot + be honored. + + + The following example demonstrates how to use + stream_set_write_buffer to create an unbuffered stream. + + <function>stream_set_write_buffer</function> example + + + + + + + + See also fopen and fwrite. + + + + +