[][src]Struct termscp::fs::explorer::FileExplorer

pub struct FileExplorer {
    pub wrkdir: PathBuf,
    // some fields omitted
}

FileExplorer

File explorer states

Fields

wrkdir: PathBuf

Implementations

impl FileExplorer[src]

pub fn pushd(&mut self, dir: &Path)[src]

pushd

push directory to stack

pub fn popd(&mut self) -> Option<PathBuf>[src]

popd

Pop directory from the stack and return the directory

pub fn set_files(&mut self, files: Vec<FsEntry>)[src]

set_files

Set Explorer files This method will also sort entries based on current options Once all sorting have been performed, index is moved to first valid entry.

pub fn count(&self) -> usize[src]

count

Return amount of files

pub fn iter_files(&self) -> impl Iterator<Item = &FsEntry> + '_[src]

iter_files

Iterate over files Filters are applied based on current options (e.g. hidden files not returned)

pub fn iter_files_all(&self) -> impl Iterator<Item = &FsEntry> + '_[src]

iter_files_all

Iterate all files; doesn't care about options

pub fn get_current_file(&self) -> Option<&FsEntry>[src]

get_current_file

Get file at index

pub fn sort_by(&mut self, sorting: FileSorting)[src]

sort_by

Choose sorting method; then sort files

pub fn get_file_sorting(&self) -> FileSorting[src]

get_file_sorting

Get current file sorting method

pub fn group_dirs_by(&mut self, group_dirs: Option<GroupDirs>)[src]

group_dirs_by

Choose group dirs method; then sort files

pub fn incr_index(&mut self)[src]

incr_index

Increment index to the first visible FsEntry. If index goes to files.len() - 1, the value will be seto to the minimum acceptable value

pub fn incr_index_by(&mut self, n: usize)[src]

incr_index_by

Increment index by up to n If index goes to files.len() - 1, the value will be seto to the minimum acceptable value

pub fn decr_index(&mut self)[src]

decr_index

Decrement index to the first visible FsEntry. If index is 0, its value will be set to the maximum acceptable value

pub fn decr_index_by(&mut self, n: usize)[src]

decr_index_by

Decrement index by up to n

pub fn index_at_first(&mut self)[src]

index_at_first

Move index to first "visible" fs entry

pub fn get_index(&self) -> usize[src]

get_index

Return index

pub fn get_relative_index(&self) -> usize[src]

get_relative_index

Get relative index based on current options

pub fn set_index(&mut self, idx: usize)[src]

set_index

Set index to idx. If index exceeds size, is set to count() - 1; or 0

pub fn set_abs_index(&mut self, idx: usize)[src]

set_abs_index

Set absolute index

pub fn toggle_hidden_files(&mut self)[src]

toggle_hidden_files

Enable/disable hidden files

Trait Implementations

impl Default for FileExplorer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,