Skip to main content

file_candidates

Function file_candidates 

Source
pub fn file_candidates(
    file: &str,
    subdir: Option<&str>,
    extension: Option<&str>,
) -> Vec<PathBuf>
Expand description

The list of paths find_file checks, in the order it checks them.

  • An absolute path is tried as given.
  • A relative path is tried inside XDG_CONFIG_HOME (e.g. ~/.config), then XDG_DATA_HOME (e.g. ~/.local/share/), then /usr/share/, each with the i3status-rust directory (and subdir, if given) appended.
  • A path without an extension is also tried with extension appended.