Skip to content

Blazingly fast file search library built in Rust

License

Notifications You must be signed in to change notification settings

jjjermiah/Rust_Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Search

Blazingly fast file search library built in Rust 🔥 [Work in progress]

Usage

Add rust_search = "0.1.2" in Cargo.toml.

[dependencies]
rust_search = "0.1.2

Then, use it in your code:

use rust_search::{get_paths, Depth, FileType, SearchInput};

fn main(){
    let paths = get_paths("/path/to/directory", SearchInput::Some("fileName"), FileType::Some(".fileExtension"), Depth::Some(depthOfFoldersToSearch));
    for path in paths {
        println!("{}", path);
    }
}

To get all the files with a specific extension in a directory, use:

get_paths("/path/to/directory", SearchInput::None, FileType::Some(".fileExtension"), Depth::Some(1));

To get all the files in a directory, use:

get_paths("/path/to/directory", SearchInput::None, FileType::None), Depth::Some(1));

About

Blazingly fast file search library built in Rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%