pub struct FileExplorer { /* private fields */ }Expand description
File explorer for navigating directories and selecting images.
Implementations§
Source§impl FileExplorer
impl FileExplorer
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Creates a new file explorer starting from the current working directory.
Sourcepub fn enter_selected(&mut self) -> Result<()>
pub fn enter_selected(&mut self) -> Result<()>
Performs action on the currently selected entry.
- For directories: enters the directory
- For images: toggles selection (select if unselected, deselect if selected)
- Maximum of 4 images can be selected
Sourcepub fn current_dir(&self) -> &PathBuf
pub fn current_dir(&self) -> &PathBuf
Returns the current directory path.
Sourcepub fn selected_index(&self) -> usize
pub fn selected_index(&self) -> usize
Returns the index of the currently selected entry.
Sourcepub fn selected_images(&self) -> &[PathBuf]
pub fn selected_images(&self) -> &[PathBuf]
Returns the list of selected image paths.
Auto Trait Implementations§
impl Freeze for FileExplorer
impl RefUnwindSafe for FileExplorer
impl Send for FileExplorer
impl Sync for FileExplorer
impl Unpin for FileExplorer
impl UnsafeUnpin for FileExplorer
impl UnwindSafe for FileExplorer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more