svn_fs_file_contents

Function svn_fs_file_contents 

Source
pub unsafe extern "C" fn svn_fs_file_contents(
    contents: *mut *mut svn_stream_t,
    root: *mut svn_fs_root_t,
    path: *const c_char,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Set @a *contents to a readable generic stream that will yield the contents of the file @a path in @a root. Allocate the stream in @a pool. You can only use @a *contents for as long as the underlying filesystem is open. If @a path is not a file, return #SVN_ERR_FS_NOT_FILE.

If @a root is the root of a transaction, it is possible that the contents of the file @a path will change between calls to svn_fs_file_contents(). In that case, the result of reading from @a *contents is undefined.

@todo kff: I am worried about lifetime issues with this pool vs the trail created farther down the call stack. Trace this function to investigate…