Function sortery::tools::sort::is_sortable[][src]

fn is_sortable(
    path: &File,
    exclude_type: &(&str, bool),
    only_type: &(&str, bool)
) -> bool
Expand description

Return true if:

  1. path’s type is in only_type.0 and only_type.1 is true
  2. path’s type is not in exclude_type.0, and only_type.1 is false

“Type” refers to the file extension, as in "jpg", "png", etc. exclude_type and only_type correspond with exclude_type and only_type in get_sorting_results, respectively.