Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
Description
Current Situation
- For FTP/FTPS directory listings:
- The YADE currently uses LIST to retrieve directory contents.
- LIST returns a human-readable directory listing whose format depends on the FTP server and its operating system.
- For example, one server may return:
-rw-r--r-- 1 user group 12345 Sep 24 10:30 example.txt
- Another server may return:
09-24-26 10:30AM 12345 example.txt
- The YADE currently uses LIST to retrieve directory contents.
- Consequences
- Apache Commons Net parses the LIST response and converts the server-specific output into FTPFile objects.
- Apache Commons Net supports many common LIST formats, but LIST itself is not standardized.
- The parser can therefore fail or produce incorrect file information when the server uses an unsupported or unexpected format.
- Potential differences include:
- Date and time formats.
- Localized month names.
- Server operating system and FTP server implementation.
- Server-specific formatting.
- In particular, timestamps from LIST may represent the server's local time without an explicit timezone, which can lead to ambiguous or incorrect timestamps.
Desired Behaviour
- Prefer MLSD for directory listings.
- MLSD provides standardized, machine-readable directory information instead of a server-specific human-readable format.
- For example:
type=file;size=12345;modify=20260924103000; example.txt type=dir;modify=20260924091500; subdirectory
- Information such as type, size and modify is provided as standardized facts.
- The modify timestamp uses a standardized UTC-based representation, avoiding the timezone ambiguity that can occur with LIST.
- For example:
- MLSD provides standardized, machine-readable directory information instead of a server-specific human-readable format.
- Fall back to LIST if MLSD is not supported by the server.
Test Instructions
- Use the standard YADE FTP/FTPS test suite, which performs FileSpec selection from a directory (Recursive=true|false).
- Set the YADE Job log level to DEBUG
- Expected result:
- File specification selection and directory listing work successfully without any issues related to this change.
- The job log at DEBUG level should shows that the MLSD command is executed.