ftp
ftp copied to clipboard
Add STAT command support and tests
trafficstars
This pull request adds support for the STAT command to the FTP client, as well as the corresponding tests to ensure its correct functionality.
Changes:
- Implemented
Statmethod inftp.goto issue the STAT FTP command and return the status of a file or directory. - Added
TestServerConn_Statfunction inclient_test.goto test the newStatmethod.
Testing:
- Created a directory and a file in the test setup.
- Verified that the
Statmethod returns the correct status for both the directory and the file.
This enhancement provides additional functionality to the FTP client, allowing users to retrieve status information about files and directories on the server.