Function cloudabi::file_open [] [src]

pub unsafe fn file_open(
    dirfd_: lookup,
    path_: &[u8],
    oflags_: oflags,
    fds_: *const fdstat,
    fd_: &mut fd
) -> errno

Opens a file.

Parameters

dirfd: The working directory at which the resolution of the file to be opened starts.

path: The path of the file that should be opened.

oflags: The method at which the file should be opened.

fds: fdstat.fs_rights_base and fdstat.fs_rights_inheriting specify the initial rights of the newly created file descriptor. The operating system is allowed to return a file descriptor with fewer rights than specified, if and only if those rights do not apply to the type of file being opened.

fdstat.fs_flags specifies the initial flags of the file descriptor.

fdstat.fs_filetype is ignored.

fd: The file descriptor of the file that has been opened.