3

What is the purpose of the FileTransfer?

I read its documentation page, but it's not clear when a module should deal with that class or one of its child classes.

1 Answer 1

5

FileTransfer is an abstract class for transfering files that specific implementations should extend. The available implementations are FTPFileTransfer, SSHFileTransder and LocalFileTransfer, which are used to transfer files using different methods.

What separates it from the "traditional" file transfer is that it is designed to operate on directories that are not writable by the web-server.

An obvious example is the update manager, which, by using these classes, is able to dowload and install module and theme updates automatically.

A module might interact with one of these classes in order to transfer files via FTP or SSH.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.