Function nstd_sys::fs::nstd_fs_write

source ·
#[no_mangle]
pub unsafe extern "C" fn nstd_fs_write(
    path: &NSTDStr,
    content: &NSTDSlice
) -> NSTDIOError
Available on crate feature fs only.
Expand description

Overwrites the contents of a file.

Parameters:

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

  • const NSTDSlice *content - The new content to write to the file.

Returns

NSTDIOError errc - The I/O operation error code.

Panics

This operation will panic if content’s stride is not 1.

Safety

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