[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r33427 - in trunk/subversion: include libsvn_subr

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Sat, 4 Oct 2008 02:08:19 +0200

2008-10-04 02:01:54 gstein_at_tigris.org napisaƂ(a):
> Author: gstein
> Date: Fri Oct 3 17:01:54 2008
> New Revision: 33427
>
> Log:
> Add new functions to easily open a stream onto a file.
>
> * subversion/include/svn_io.h:
> (svn_stream_open_readonly, svn_stream_open_writable): new declarations
>
> * subversion/libsvn_subr/stream.c:
> (svn_stream_open_readonly, svn_stream_open_writable): new functions
>
> Modified:
> trunk/subversion/include/svn_io.h
> trunk/subversion/libsvn_subr/stream.c
>
> Modified: trunk/subversion/include/svn_io.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_io.h?pathrev=33427&r1=33426&r2=33427
> ==============================================================================
> --- trunk/subversion/include/svn_io.h Fri Oct 3 17:00:30 2008 (r33426)
> +++ trunk/subversion/include/svn_io.h Fri Oct 3 17:01:54 2008 (r33427)
> @@ -652,6 +652,37 @@ svn_stream_t *
> svn_stream_disown(svn_stream_t *stream,
> apr_pool_t *pool);
>
> +
> +/** Create a stream to read the file at @a path. It will be opened using
> + * the APR_BUFFERED and APR_BINARY flag, and APR_OS_DEFAULT for the perms.
> + * If you'd like to use different values, then open the file yourself, and
> + * use the svn_stream_from_aprfile2() interface.
> + *
> + * The stream will be returned in @a stream, and allocated from @a result_pool.
> + * Temporary allocations will be performed in @a scratch_pool.

You should add '@since New in 1.6.'.

> + */
> +svn_error_t *
> +svn_stream_open_readonly(svn_stream_t **stream,
> + const char *path,
> + apr_pool_t *result_pool,
> + apr_pool_t *scratch_pool);
> +
> +
> +/** Create a stream to write the file at @a path. It will be opened using
> + * the APR_BUFFERED and APR_BINARY flag, and APR_OS_DEFAULT for the perms.
> + * If you'd like to use different values, then open the file yourself, and
> + * use the svn_stream_from_aprfile2() interface.
> + *
> + * The stream will be returned in @a stream, and allocated from @a result_pool.
> + * Temporary allocations will be performed in @a scratch_pool.

Same here.

> + */
> +svn_error_t *
> +svn_stream_open_writable(svn_stream_t **stream,
> + const char *path,
> + apr_pool_t *result_pool,
> + apr_pool_t *scratch_pool);
> +
> +
> /** Create a stream from an APR file. For convenience, if @a file is
> * @c NULL, an empty stream created by svn_stream_empty() is returned.
> *

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-10-04 02:11:20 CEST

This is an archived mail posted to the Subversion Dev mailing list.