Implement MLSD & fix MLST
Disclaimer: A lot of this code was written with AI assistance. I reviewed it & improved the test coverage.
Additional fixes (in separate commits which can be cherry-picked if needed):
- MLST output was incorrect/out of spec. Output was something like
213 <facts> filename, where it should be a multi-line format initiated by250-and ended by250, as per https://datatracker.ietf.org/doc/html/rfc3659#section-7.2 - There was a small bug where uid was used instead of gid for MLST facts
- As noted correclty by @LLeny, facts list must be terminated by semicolon. Grammar from RFC:
facts = 1*( fact ";" )
Since async_ftp does not support MLST nor MLSD, we (Claude and me :) added manual TCP-based tests for both commands in the existing sbe-fs integration test suite. This is obviously weaker since we don't have a compliant client to check against. In addition, I manually tested this against rclone's FTP client and FileZilla.
Small issue, I believe the rfc states that all facts must end with a ';', even the last one. It's problematic with the rclone ftp implementation.
@LLeny you are absolutely right, thank you! I didn't encounter any issues in my testing with rclone however
@procr1337 For reference, I did, there: https://github.com/LLeny/proton-drive-bridge/issues/9
Thank you @procr1337 and @LLeny