Closed piegamesde closed 1 year ago
Would you be willing to prepare a PR?
I had a look at the code and noticed that it didn't recurse into sub-directories. Thus, it kind of makes sense if the code lists some entries as symlinks if there are any. We could resolve them of course, but what for? The remaining cases (the traversal to the directory itself) are already resolved by std::fs::read_dir
, see #21.
As far as I can tell, recursive walks are a bit out of scope for this crate, especially as walkdir
best provides that functionality. I'll see if I can come up with some additions that help with my use cases. Sadly, changing the return type of many methods from Vec
to impl Iterator
would be a breaking change.
It seems like the issue has been resolved to the extent of the scope.
xdg.list_local_files
will simply list all symlinks contained in that directory, instead of providing their targets' content. Symlink-joining folders in a data directory is a rather common pattern, especially when using Nix (although I just ran into this in a different context).