Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_io.h view on Meta::CPAN
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Return a generic stream which wraps another primary stream,
* delaying the "opening" of that stream until the first time the
* returned stream is accessed.
*
* @a open_func and @a open_baton are a callback function/baton pair
* which will be invoked upon the first access of the returned
* stream (read, write, mark, seek, skip, or possibly close). The
* callback shall open the primary stream.
*
* If the only "access" the returned stream gets is to close it
* then @a open_func will only be called if @a open_on_close is TRUE.
*
* @since New in 1.8.
*/
svn_stream_t *
svn_stream_lazyopen_create(svn_stream_lazyopen_func_t open_func,
void *open_baton,
svn_boolean_t open_on_close,
apr_pool_t *result_pool);
/** @} */
/** Set @a *result to a string containing the contents of @a
* filename, which is either "-" (indicating that stdin should be
* read) or the utf8-encoded path of a real file.
*
* @warning Callers should be aware of possible unexpected results
* when using this function to read from stdin where additional
* stdin-reading processes abound. For example, if a program tries
* both to invoke an external editor and to read from stdin, stdin
* could be trashed and the editor might act funky or die outright.
*
* @note due to memory pseudo-reallocation behavior (due to pools), this
* can be a memory-intensive operation for large files.
*
* @since New in 1.5.
*/
svn_error_t *
svn_stringbuf_from_file2(svn_stringbuf_t **result,
const char *filename,
apr_pool_t *pool);
/** Similar to svn_stringbuf_from_file2(), except that if @a filename
* is "-", return the error #SVN_ERR_UNSUPPORTED_FEATURE and don't
* touch @a *result.
*
* @deprecated Provided for backwards compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_stringbuf_from_file(svn_stringbuf_t **result,
const char *filename,
apr_pool_t *pool);
/** Sets @a *result to a string containing the contents of the already opened
* @a file. Reads from the current position in file to the end. Does not
* close the file or reset the cursor position.
*
* @note due to memory pseudo-reallocation behavior (due to pools), this
* can be a memory-intensive operation for large files.
*/
svn_error_t *
svn_stringbuf_from_aprfile(svn_stringbuf_t **result,
apr_file_t *file,
apr_pool_t *pool);
/** Remove file @a path, a utf8-encoded path. This wraps apr_file_remove(),
* converting any error to a Subversion error. If @a ignore_enoent is TRUE, and
* the file is not present (APR_STATUS_IS_ENOENT returns TRUE), then no
* error will be returned.
*
* The file will be removed even if it is not writable. (On Windows and
* OS/2, this function first clears the file's read-only bit.)
*
* @since New in 1.7.
*/
svn_error_t *
svn_io_remove_file2(const char *path,
svn_boolean_t ignore_enoent,
apr_pool_t *scratch_pool);
/** Similar to svn_io_remove_file2(), except with @a ignore_enoent set to FALSE.
*
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_io_remove_file(const char *path,
apr_pool_t *pool);
/** Recursively remove directory @a path. @a path is utf8-encoded.
* If @a ignore_enoent is @c TRUE, don't fail if the target directory
* doesn't exist. Use @a pool for temporary allocations.
*
* Because recursive delete of a directory tree can be a lengthy operation,
* provide @a cancel_func and @a cancel_baton for interruptibility.
*
* @since New in 1.5.
*/
svn_error_t *
svn_io_remove_dir2(const char *path,
svn_boolean_t ignore_enoent,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/** Similar to svn_io_remove_dir2(), but with @a ignore_enoent set to
* @c FALSE and @a cancel_func and @a cancel_baton set to @c NULL.
*
* @deprecated Provided for backward compatibility with the 1.4 API
*/
SVN_DEPRECATED
svn_error_t *
svn_io_remove_dir(const char *path,
apr_pool_t *pool);
/** Read all of the disk entries in directory @a path, a utf8-encoded
( run in 1.264 second using v1.01-cache-2.11-cpan-f5b5a18a01a )