Skip to main content

open

Function open 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn open( path: *const c_char, oflag: c_int, ... ) -> c_int
Expand description

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/open.html.

Establishes a connection between a file and a file descriptor.

Upon success, opens the file and returns a non-negative integer representing the file descriptor. Upon failure, returns -1 and sets errno to indicate the error. If -1 is returned, no files shall be created or modified.