Try using `fs_at`
Context: https://github.com/sourcefrog/conserve/issues/172#issuecomment-1206291687
Using fs_at would potentially reduce time spent both constructing paths, and inside the kernel on parsing and traversing paths.
This probably needs to be threaded through the Transport layer, as not all transports will support the same concept.
This could be implemented independently on both source/restore trees, and archives.
I don't think this is a dominant performance driver at the moment but it might be interesting.
To do this usefully I think we'd need ReadDir equivalent (https://github.com/rbtcollins/fs_at/issues/11).
cc @rbtcollins fyi
To use fs_at, it would have to also support stating files and reading links, which it currently does not, but which could be possible with readlinkat and fstatat.
fstat : https://doc.rust-lang.org/std/fs/struct.File.html#method.metadata [if you want to minimise calls, open() + fstat is cheaper than fstatat () + open() + fstat() to check it is still what you expected.]
readlinkat is probably needed, haven't gotten that far yet :P .
https://github.com/sourcefrog/cp_r/compare/fs_at?expand=1 is an experiment towards using fs_at in a similar but smaller crate.