5 releases (3 breaking)

new 0.4.0 Feb 22, 2025
0.3.0 Oct 13, 2024
0.2.0 Oct 9, 2024
0.1.1 Sep 26, 2024
0.1.0 Sep 26, 2024

#826 in Filesystem

MIT license

7KB
93 lines

Get Dir

An utility to get directory.

This utility searches for a target directory by checking for any directories or files that match the provided input.

Usage

Get directory by target with the following code:

use get_dir::{
    Target,
    TargetType,
    get_dir_by_target,
};

get_dir_by_target(Target { 
    name: "src", 
    ty: TargetType::Dir,
});

Or get directory by target in reverse with the following code:

use get_dir::{
    Target,
    TargetType,
    get_dir_by_target_reverse,
};

get_dir_by_target_reverse(Target {
    name: "LICENSE",
    ty: TargetType::File,
});

License

This project is MIT licensed, you can find the license file here.


lib.rs:

Get Dir

An utility to get directory.

This utility searches for a target directory by checking for any directories or files that match the provided input.

Usage

Get directory by target with the following code:

use get_dir::{
    Target,
    TargetType,
    get_dir_by_target,
};

get_dir_by_target(Target {
    name: "src",
    ty: TargetType::Dir,
});

Or get directory by target in reverse with the following code:

use get_dir::{
    Target,
    TargetType,
    get_dir_by_target_reverse,
};

get_dir_by_target_reverse(Target {
    name: "LICENSE",
    ty: TargetType::File,
});

No runtime deps

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy