pub struct FileBrowser {
pub current_path: PathBuf,
pub entries: Vec<FileEntry>,
pub selected_index: usize,
pub show_hidden: bool,
/* private fields */
}Fields§
§current_path: PathBuf§entries: Vec<FileEntry>§selected_index: usizeImplementations§
Source§impl FileBrowser
impl FileBrowser
pub fn new() -> Self
pub fn from_path(path: PathBuf) -> Self
pub fn list_dir(path: &PathBuf, include_hidden: bool) -> Vec<FileEntry>
pub fn enter(&mut self)
pub fn go_up(&mut self)
Sourcepub fn try_refresh(&mut self)
pub fn try_refresh(&mut self)
Re-read the current directory if enough time has passed since the last refresh. Preserves the selected index and checkbox selection state across the re-read.
pub fn selected_entry(&self) -> Option<&FileEntry>
pub fn selected_file_info(&self) -> Option<&McrawFileInfo>
pub fn current_path_display(&self) -> String
pub fn toggle_selection(&mut self)
Sourcepub fn selected_mcraw_paths(&self) -> Vec<String>
pub fn selected_mcraw_paths(&self) -> Vec<String>
Collect paths of all selected .mcraw files, or the cursor file if none selected
Trait Implementations§
Source§impl Clone for FileBrowser
impl Clone for FileBrowser
Source§fn clone(&self) -> FileBrowser
fn clone(&self) -> FileBrowser
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileBrowser
impl RefUnwindSafe for FileBrowser
impl Send for FileBrowser
impl Sync for FileBrowser
impl Unpin for FileBrowser
impl UnsafeUnpin for FileBrowser
impl UnwindSafe for FileBrowser
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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