Re: Re: php_copy_file

From: Date: Fri, 15 Mar 2002 21:33:07 +0000
Subject: Re: Re: php_copy_file
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-81299@lists.php.net to get a copy of this message
At 20:55 15.03.2002, you wrote:
Well, we have this: php_stream_copy_to_stream(srcstream, deststream, maxlen) that does that kind of thing :-) If maxlen is 0 it copies until EOF. It has some sense to use mmap when the source is a plain file too.
Should react on -1 otherwise you cannot call the function in code where the length is calculated automatically. Say you have stream a = <length> <data>*<length> read length copy_stream_to_stream(length) now it fails because you expect if (lngth) copy_strwam_to_stream(length) regards marcus
Howzat? --Wez. On 16/03/02, "l0t3k" <cshmoove@hotmail.com> wrote: Wez,
    i keep forgetting to ask you to add a "standard" stream copy function
(perhaps using a configurable buffer). that way, i can write me a simple streamer by fopening my favorite MP3 and copying it to a socket <g> "Wez Furlong" <wez@thebrainroom.com> wrote in message news:emaildo3c9234a743478.20020315175135.71302@thebrainroom.com...
Any objections to stream enabling the php_copy_file function; this will allow copying to/from anything that can be accessed by the stream "fopen" wrappers? --Wez.
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.dev (#81299) next »