pub struct FileUX {}
Expand description
File dialog functions.
Implementations
sourceimpl FileUX
impl FileUX
sourcepub fn save_file_dialog(self, proposed_filename: &str, data: &[u8])
pub fn save_file_dialog(self, proposed_filename: &str, data: &[u8])
Lets the user save raw data to a file, popping up a Save file dialog pointing at the Downloads folder.
The proposed filename must include a file extension, this will be used to set up the filter in the dialog box.
Returns false if the user cancelled the save file dialog.
sourcepub fn open_file_dialog(self, file_type_filter: &str) -> Option<Vec<u8>>
pub fn open_file_dialog(self, file_type_filter: &str) -> Option<Vec<u8>>
Lets the user read raw data from a file, popping up an Open file dialog.
file_type_filter
can be used to filter file types. To query for PNG
files, specify “*.png”, for example. Multiple filters are not yet supported.
Returns an empty vector if the user cancelled the open file dialog.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FileUX
impl Send for FileUX
impl Sync for FileUX
impl Unpin for FileUX
impl UnwindSafe for FileUX
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more