You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Damir Dezeljin <pr...@nib.si> on 2002/11/21 08:57:52 UTC
ftell() equivalent???
Hi.
Is there any APR function to get current stream and/or file position.
Does this applay also to apr_socket_t ?
Regards,
Dezo
Re: ftell() equivalent???
Posted by Jeff Trawick <tr...@attglobal.net>.
Damir Dezeljin <pr...@nib.si> writes:
> Hi.
>
> Is there any APR function to get current stream and/or file position.
for file position, apr_file_seek() can tell you where you are
offset = 0;
apr_file_seek(myfile, APR_CUR, &offset);
offset now has location in file
> Does this applay also to apr_socket_t ?
APR doesn't keep up with how many bytes have been read on a socket so
it can't give you any such position information.
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...
Re: ftell() equivalent???
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
apr_file_seek(APR_CUR, 0) will find you the current offset.
Bill
At 01:57 AM 11/21/2002, you wrote:
>Hi.
>
>Is there any APR function to get current stream and/or file position.
>
>Does this applay also to apr_socket_t ?
>
>Regards,
>Dezo