We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sort_by_file_name
let paths = WalkDir::new(current_dir) .sort_by_file_name() .into_iter() .filter_map(Result::ok) .map(DirEntry::into_path) .collect::<Vec<_>>();
This leads to the outcome being random every time the program is run
EDIT: I'm on Windows 11 22H2 (22621.1778) using the latest stable Rust and walkdir
Windows 11 22H2 (22621.1778)
The text was updated successfully, but these errors were encountered:
Can you provide a full reproduction? Otherwise this might be something you'll have to debug on your own.
Sorry, something went wrong.
@ShayBox it might be because you're thinking that it sorts by file name, while in fact, it sorts by sub-folder first (by full path).
This got me confused as well at first, and ended up here, then I realised that even though it says by_file_name, it's really by_path_alphabetical.
by_file_name
by_path_alphabetical
HTH.
No branches or pull requests
This leads to the outcome being random every time the program is run
EDIT: I'm on
Windows 11 22H2 (22621.1778)
using the latest stable Rust and walkdirThe text was updated successfully, but these errors were encountered: