3

What is the purpose of the PHP class FileTransfer? In which cases, should a module deal with that class or one of its child classes?

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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