nstd_fs_read_to_string

Function nstd_fs_read_to_string 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn nstd_fs_read_to_string( path: &NSTDStr, ) -> NSTDIOStringResult<'_>
Available on crate feature fs only.
Expand description

Reads the contents of a file into a UTF-8 string.

§Parameters:

  • const NSTDStr *path - A path to the file to read.

§Returns

NSTDIOStringResult contents - The file’s contents, or the I/O operation error code on failure.

§Safety

This operation can cause undefined behavior if path’s data is invalid.