pub unsafe extern "C" fn svn_stream_open_unique(
stream: *mut *mut svn_stream_t,
temp_path: *mut *const c_char,
dirpath: *const c_char,
delete_when: svn_io_file_del_t,
result_pool: *mut apr_pool_t,
scratch_pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description
Create a writable stream to a file in the directory @a dirpath. The file will have an arbitrary and unique name, and the full path will be returned in @a temp_path. The stream will be returned in @a stream. Both will be allocated from @a result_pool.
If @a dirpath is @c NULL, use the path returned from svn_io_temp_dir(). (Note that when using the system-provided temp directory, it may not be possible to atomically rename the resulting file due to cross-device issues.)
The file will be deleted according to @a delete_when. If that is #svn_io_file_del_on_pool_cleanup, it refers to @a result_pool.
Temporary allocations will be performed in @a scratch_pool.
@since New in 1.6 @see svn_io_open_unique_file3()