Skip to content

ftp: add ListDirectoryWithTime with change time#701

Merged
hamishwillee merged 2 commits into
masterfrom
pr-ftp-list-with-time
May 23, 2026
Merged

ftp: add ListDirectoryWithTime with change time#701
hamishwillee merged 2 commits into
masterfrom
pr-ftp-list-with-time

Conversation

@julianoes
Copy link
Copy Markdown
Contributor

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

FYI @auturgy.

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
Comment thread en/services/ftp.md
| <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). |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To other reviewers, this is the only change in the table - the rest of the update is caused by running prettier.

@hamishwillee
Copy link
Copy Markdown
Collaborator

Looks really good. We'll merge when the other one goes in.

Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging as the corresponding message PR merged. mavlink/mavlink#2491

@hamishwillee hamishwillee merged commit 4c694c7 into master May 23, 2026
@hamishwillee hamishwillee deleted the pr-ftp-list-with-time branch May 23, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants