ftp: add ListDirectoryWithTime with change time#701
Merged
Conversation
The current ListDirectory command doesn't support the last changed time of a file or directory. This is a limitation when it comes to using FTP to download logs. Therefore, I suggest to add ListDirectoryWithTime here, somewhat similar to how it was done for in the internet FTP protocol which added the machine-readable `MLSD` command alongside the original `LIST`. See: RFC 3659: https://datatracker.ietf.org/doc/html/rfc3659
| | <a id="Rename"></a> 13 | Rename | Rename `<path1>` to `<path2>`.<br>- Sends an ACK reply the no data on success, otherwise a NAK packet with an error code (i.e. if the source path does not exist). | | ||
| | <a id="CalcFileCRC32"></a> 14 | CalcFileCRC32 | Calculate CRC32 for file at `<path>`.<br>- Sends an ACK reply with the checksum on success, otherwise a NAK packet with an error code. | | ||
| | <a id="BurstReadFile"></a> 15 | [BurstReadFile](#reading-a-file-burstreadfile) | Burst-read parts of a file. Messages in the burst are streamed (without ACK) until the burst is complete (as indicated by the field `burst_complete` being set to `1`). Parts of a burst that are dropped may be fetched using [ReadFile](#ReadFile). | | ||
| | <a id="ListDirectoryWithTime"></a> 16 | [ListDirectoryWithTime](#list_directory_with_time) | List directory entry information as for [ListDirectory](#ListDirectory), but with each entry additionally including its last-modification time. Lets a GCS fetch timestamps without downloading file contents.<br>- A server that does not implement this command NAKs with [UnknownCommand](#UnknownCommand); clients should then fall back to [ListDirectory](#ListDirectory). | |
Collaborator
There was a problem hiding this comment.
To other reviewers, this is the only change in the table - the rest of the update is caused by running prettier.
Collaborator
|
Looks really good. We'll merge when the other one goes in. |
hamishwillee
approved these changes
May 23, 2026
Collaborator
hamishwillee
left a comment
There was a problem hiding this comment.
Merging as the corresponding message PR merged. mavlink/mavlink#2491
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current ListDirectory command doesn't support the last changed time of a file or directory. This is a limitation when it comes to using FTP to download logs.
Therefore, I suggest to add ListDirectoryWithTime here, somewhat similar to how it was done for in the internet FTP protocol which added the machine-readable
MLSDcommand alongside the originalLIST.See: RFC 3659: https://datatracker.ietf.org/doc/html/rfc3659
FYI @auturgy.