file_picker

Crates.iofile_picker
lib.rsfile_picker
version0.3.4
sourcesrc
created_at2024-11-15 22:57:18.185991
updated_at2024-11-28 21:43:57.045459
descriptionPrompts the user to pick a file interactively from the current directory.
homepagehttps://github.com/rootfebri/file_picker
repository
max_upload_size
id1449719
size65,593
Febri hehe (rootfebri)

documentation

README

Prompts the user to pick a file interactively from the current directory.

Arguments

  • label - A string slice that holds the prompt label to display to the user.

Returns

  • std::io::Result<PathBuf> - Returns the PathBuf of the selected file.

Examples

fn main() -> std::io::Result<()> {
    let file_path = file_picker::file_picker("Select a file:")?;
    println!("You selected the file: {}", file_path.display());

    let dir_path = file_picker::dir_picker("Select a directory:")?;
    println!("You selected the directory: {}", dir_path.display());
}
Commit count: 0

cargo fmt