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

Add Stat based on MLST command #1

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

panthony
Copy link

@panthony panthony commented Jun 8, 2022

This PR expose the MLST command that allows returning the metadata of a file without relying on a list.

The returned msg has the following format:

C> MLST
S> 250-Begin
S>  type=dir;unique=AQkAAAAAAAABCAAA; /
S> 250 End.

https://datatracker.ietf.org/doc/html/rfc3659#section-7.7.5

I was not sure how to handles the "begin/end", it looks like in "List" it is ignored because it fails the parsing.

There is a slight difference with MLSD apparently because the file content is prefixed by a whitespace.

The idea for this function is to be used in findItem when supported to avoid an unnecessary listing to retrieve an item which I'm currently trying to implement.

Sorry for the lack of test there was nothing bootstrapped to add a test easily

@panthony panthony changed the title Add GetEntryInfo based on MLST command Add Stat based on MLST command Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant