Trait fsort::file_collection::FileCollection
[−]
[src]
pub trait FileCollection: IntoIterator<Item = PathBuf, IntoIter = PathIter> { fn add_file(&mut self, path: &Path) -> Result; fn add_directory(
&mut self,
path: &Path,
recursive: bool,
error_behavior: ErrorBehavior
) -> Result; fn get_order(&self) -> Order; fn set_order(&mut self, order: Order); fn path_iter(&self) -> PathIter; }
A trait for objects which are sorted collections of files.
Required Methods
fn add_file(&mut self, path: &Path) -> Result
fn add_directory(
&mut self,
path: &Path,
recursive: bool,
error_behavior: ErrorBehavior
) -> Result
&mut self,
path: &Path,
recursive: bool,
error_behavior: ErrorBehavior
) -> Result
Adds all files of a directory to the collection.
fn get_order(&self) -> Order
Returns the current order of the collection.
fn set_order(&mut self, order: Order)
Sets the current order of the collection.
fn path_iter(&self) -> PathIter
Returns an iterator about all the (sorted) paths in the collection according to the order.
Examples
See DynamicCollection::set_criterion
Implementors
impl FileCollection for DynamicCollection
impl<C: Criterion> FileCollection for StaticCollection<C>