Enum find_folder::Search [] [src]

pub enum Search {
    Parents(ParentsDepth),
    Kids(KidsDepth),
    ParentsThenKids(ParentsDepthKidsDepth),
    KidsThenParents(KidsDepthParentsDepth),
}

The direction in which find_folder should search for the folder.

Variants

Search recursively through parent directories with the given depth.

Search recursively through children directories with the given depth.

Search parents and then kids (same as Both).

Search kids and then parents.

Methods

impl Search
[src]

An easy API method for finding a folder with a given name. i.e. Search::Kids(u8).for_folder("assets")

Use this to search in a specific folder.

This method transforms a Search into a SearchFolder, but that detail is mostly irrelevant. See the example for recommended usage.

Example

use find_folder::Search;

let mut exe_folder = std::env::current_exe().unwrap();
exe_folder.pop(); // Remove the executable's name, leaving the path to the containing folder
let resource_path = Search::KidsThenParents(1, 2).of(exe_folder).for_folder("resources");

Trait Implementations

impl Copy for Search
[src]

impl Clone for Search
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Search
[src]

Formats the value using the given formatter.

impl PartialEq for Search
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Search
[src]