ftp icon indicating copy to clipboard operation
ftp copied to clipboard

Add STAT command support and tests

Open namashin opened this issue 1 year ago • 1 comments
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:

  1. Implemented Stat method in ftp.go to issue the STAT FTP command and return the status of a file or directory.
  2. Added TestServerConn_Stat function in client_test.go to test the new Stat method.

Testing:

  • Created a directory and a file in the test setup.
  • Verified that the Stat method 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.

namashin avatar Jul 10 '24 02:07 namashin