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

[Feature Request] - Support MLST and MLSD #76

Closed
mousetail opened this issue Mar 23, 2024 · 3 comments
Closed

[Feature Request] - Support MLST and MLSD #76

mousetail opened this issue Mar 23, 2024 · 3 comments
Assignees
Labels
new feature A new feature request

Comments

@mousetail
Copy link
Contributor

mousetail commented Mar 23, 2024

Description

The MLST and MLSD commands allow getting more detailed metadata about a file.

Changes

Add something like this:

fn mlsd(pathname: Option<&str>) -> Vec<FileInfo>{

}

fn mlst(pathname: &str) -> FileInfo {

}

struct FileInfo {
    pathname: String,
    size: Option<usize>,
    created: Option<DateTime>,
    modified: Option<DateTime>,
    type: Option<TypeFact>,
    unique: Option<String>,
    perm: Option<String>,
    lang: Option<String>,
    media_type: Option<String>,
    charset: Option<String>,
    custom: HashMap<String, String>
}

enum TypeFact {
    File,
    Directory,
    CurrentDirectory,
    ParentDirectory
}

Implementation

Should be fairly straightforward

@mousetail mousetail added the new feature A new feature request label Mar 23, 2024
@constituent
Copy link

I want these commands as well, but when I searched the doc and found nothing, my intuition was searching for some api to send raw command. After reading source code, I was surprised to find ImplAsyncFtpStream.perform being private.
Is there a reason that sending raw command not public? It forbids users to utilize lots of advanced features.

@veeso
Copy link
Owner

veeso commented May 18, 2024

@veeso
Copy link
Owner

veeso commented May 18, 2024

701071d

@veeso veeso closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature request
Projects
None yet
Development

No branches or pull requests

3 participants