-
For example, I want to intercept to only select ".txt" files |
Beta Was this translation helpful? Give feedback.
Answered by
Barugon
Dec 1, 2022
Replies: 2 comments
-
You can have it only show files with a specific extension by calling Example: let mut file_dlg = egui_file::FileDialog::open_file(None).filter("txt".into()); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yk0n9
-
FYI, I changed Example: let filter = Box::new(|path: &Path| -> bool {
return path.extension() == Some(OsStr::new("txt"));
});
let mut file_dlg = egui_file::FileDialog::open_file(None).filter(filter);
... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can have it only show files with a specific extension by calling
filter
.Example: