Skip to content

FTPFS should use MDTM #456

Closed
Closed
@atollk

Description

@atollk

Regarding fs.ftpfs.FS.getinfo (

def getinfo(self, path, namespaces=None):
)

That function tries to use MLST to retrieve arbitrary information of a single file and defaults to LIST if MLST is not supported.
This makes fs.copy_dir_if_newer incredibly inefficient on systems that do not support MLST.

Imo, an easy solution would be to possibly support MDTM as a fallback if only the modified datetime is requested, e.g. if namespace == ("detail", "modified").
Another, probably more complex improvement, would be to cache the LIST response rather than call it for every single file.

I can submit a PR for the first suggestion, if I get the okay that this is something that should be included. Possibly also the second, although I'm not sure yet how to best implement that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions