Chris Steingen created NET-674:
----------------------------------
Summary: FTPListParseEngine should support listing via MLSD
Key: NET-674
URL: https://issues.apache.org/jira/browse/NET-674
Project: Commons Net
Issue Type: Improvement
Components: FTP
Affects Versions: 3.6
Reporter: Chris Steingen
When using FTPClient#initiateListParsing, one can kind of "lazy" scroll over a
FTP directory, acquiring FTPFile(s) in chunks using an iterator style pattern.
The underlying code uses the LIST command.
One drawback of the LIST command though is, that depending on the OS of the
server, the results might show different precision for file
modification/creation dates of files and directories.
When working with those timestamps in directories with a growing history of
files, the timestamps "change" after a file gets older and older. This can lead
to problems in the consumer of the FTP files.
One solution is, to use MLSD instead, as this (if supported by the FTP) results
in much more precise timestamps regardless of a file's age.
FTPClient does offer methods to use MLSD (FTPClient#mlistDir for example)
instead, which do result in the desired outcome (precise timestamps).
Sadly the FTPClient API does not offer a public method for using the chunkwise
iterator-style FTPListParseEngine along with the MLSD command, although it
looks like it could be simply achievable when just exposing some methods to
public visibility.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)