| Crates.io | file_picker |
| lib.rs | file_picker |
| version | 0.4.1 |
| created_at | 2024-11-15 22:57:18.185991+00 |
| updated_at | 2025-05-22 07:34:39.790412+00 |
| description | Prompts the user to pick a file interactively from the current directory. |
| homepage | https://github.com/rootfebri/file_picker |
| repository | |
| max_upload_size | |
| id | 1449719 |
| size | 89,465 |
Prompts the user to pick a file interactively from the current directory.
label - A string slice that holds the prompt label to display to the user.std::io::Result<PathBuf> - Returns the PathBuf of the selected file.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());
}