Method lrs::file::File::rel_open

Opens a path relative to this file.

Syntax

impl File {
    fn rel_open<P>(&self, path: P, flags: FileFlags, mode: Mode) -> Result<File, Errno>
        where P: ToCString,
}

Arguments

NameDescription
path

A path to the file to be opened.

flags

The flags used when opening the path.

mode

Return value

Returns the opened path.

Remarks

The mode argument is ignored unless a new file is created via the FILE_CREATE or the FILE_TEMP flags.

If the path is relative, this file must be a directory and the path will be interpreted relative to it.

Unless lrs was compiled with the no-auto-cloexec flag, the opened file always has the O_CLOEXEC flag set.

See also