Function lrs::file::exists

Checks whether a file exists.

Syntax

fn exists<P>(path: P) -> Result<bool, Errno>
    where P: ToCString,

Arguments

NameDescription
path

The path to the file to be checked.

Return value

Returns true if the file exists, false otherwise.

Remarks

If the path refers to a symbolic link, then the existence of the symbolic link is checked.

If the path is relative, it will be interpreted relative to the current working directory.

See also