[−][src]Function lms::file_ops::sort_files
pub fn sort_files<'a, T, S>(files_to_sort: T) -> Vec<&'a S> where
T: ParallelIterator<Item = &'a S>,
S: FileOps + Sync + 'a,
Sorts (unstable) file paths in descending order by number of components, in parallel
Arguments
files_to_sort
: files to sort
Returns
A vector of file paths in descending order by number of components
Examples
["a", "a/b", "a/b/c"] becomes ["a/b/c", "a/b", "a"] ["/usr", "/", "/usr/bin", "/etc"] becomes ["/usr/bin", "/usr", "/etc", "/"]