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.
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.
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.