1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use std::path::{Path, PathBuf};
use ::Order;
mod dynamic_collection;
mod static_collection;
mod path_iter;
mod file_iter;
mod error_behavior;
mod result;
pub use self::static_collection::StaticCollection;
pub use self::dynamic_collection::DynamicCollection;
pub use self::path_iter::PathIter;
pub use self::file_iter::FileIter;
pub use self::error_behavior::ErrorBehavior;
pub use self::result::Result;
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;
}