Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MDTM command #47

Open
Ry-Kode opened this issue Jul 19, 2023 · 2 comments
Open

Support MDTM command #47

Ry-Kode opened this issue Jul 19, 2023 · 2 comments

Comments

@Ry-Kode
Copy link

Ry-Kode commented Jul 19, 2023

Hello,

First of all a kind thank you for this great library!

Secondly, I was wondering if you are considering to add support for the MDTM command to get the last modified date of a single file?

Thanks again!

@FlorianReimold
Copy link
Member

FlorianReimold commented Jul 20, 2023

I think that would be a really valuable thing to have. The current implementation is awful (well, actually the specification is awful, the implementation is alright 😀).

Here is the RFC that added MDTM:
https://datatracker.ietf.org/doc/html/rfc3659

I don't think that I will have the spare time to add that command any time soon, but PRs are always welcome 😊

Implementation must be added here:

FEAT:

void FtpSession::handleFtpCommandFEAT(const std::string& /*param*/)
{
std::stringstream ss;
ss << "211- Feature List:\r\n";
ss << " UTF8\r\n";
ss << " SIZE\r\n";
ss << " LANG EN\r\n";
ss << "211 END\r\n";
sendRawFtpMessage(ss.str());
}

MDTM similar to SIZE:

void FtpSession::handleFtpCommandSIZE(const std::string& param)

@Ry-Kode
Copy link
Author

Ry-Kode commented Jul 20, 2023

Allright Florian, thanks for the response & the tips on how to implement.

I understand your limited availability, I'm facing the same issue :-) Anyway, if I find a spare moment I'll send you a PR and try to add it.

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

No branches or pull requests

2 participants