ilang opened a new pull request, #759:
URL: https://github.com/apache/commons-vfs/pull/759
## Summary
- `setFTPFile()` now tries CWD before falling back to parent LIST for
directory existence checks
- CWD is a lightweight control-channel command (no data transfer) vs LIST
which opens a data channel and transfers the entire directory listing
- When the path is a directory, the expensive parent LIST is skipped entirely
- When the path is a file or non-existent, falls back to the original parent
LIST behavior
## Depends on
This PR depends on #757 (root exists on disconnect fix) which introduces
`FtpClient.isDirectory()`. Please merge #757 first.
## Test plan
- New `FtpCwdOptimizationTest` with 4 tests:
- Nested directory detected via CWD optimization
- File detected via LIST fallback
- Non-existent path returns IMAGINARY
- Working directory preserved after mixed CWD/LIST operations
- All existing FTP tests pass
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]