Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

Let’s review what we learned

In order to learn better, let’s review the content of the last article, we looked at the FTP to upload a document, the general process and a series of methods that might be used in this process.

With this in mind, let’s take a look at the methods provided by edtFTPj.

Knowledge points learning tasks today

The edtFTPj component provides methods for manipulating FTP, and what is the meaning of each method?

EdtFTPj component method

Ftpclient.java (ftpClient.java) : ftpClient.java (ftpClient.java) : ftpClient.java (ftpClient.java)

If you look at the source of ftpClient.java as shown above, you will see that this class has a particularly large number of constructors to provide better instantiation requirements.

Let’s focus on the method.

1. Connect () : connects to FTP

2. CheckConnection: Verifies whether the connection is established

3. SetTimeout: Set the timeout period

4. GetTimeout: Obtains the timeout period

5. GetRemotePort: indicates the FTP connection port

6. SetRemotePort: Set the FTP connection port

7. GetRemoteAddr: indicates the FTP connection address

8. SetRemoteAddr: Sets the FTP connection address

9. GetRemoteHost: Obtains the FTP connection Host

10. SetRemoteHost: Set the FTP connection Host

11. Login: indicates the login user

12. Password: Verify the password

13. Put: Uploads files

14. Get: Get the file

15. Delete: Deletes a file

16. Rename: Renames a file name

17. Rmdir: Delete the folder

18. Mkdir: Create a folder

19. Chdir: Switch folders

summary

This is our common FTP operation methods, I hope you have some useful.