svn_stringbuf_from_file2

Function svn_stringbuf_from_file2 

Source
pub unsafe extern "C" fn svn_stringbuf_from_file2(
    result: *mut *mut svn_stringbuf_t,
    filename: *const c_char,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

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.