+
+
+class BaseFileTransferer:
+ """
+ Ensures file transfer from the Web Server to the CIS (here).
+
+ Several implementations can be done by extending this class for
+ file transfer protocol such as FTP, SCP, RSYNC, HTTP etc.
+ """
+
+ local_path = ''
+ remote_path = ''
+
+ def __init__(self, local_path='', remote_path=''):
+ """ Initialize by setting local and remote paths for file transfer. """
+ self.local_path = local_path
+ self.remote_path = remote_path
+
+ def __del__(self):
+ self.close()
+
+ def get(self, files):
+ """
+ Transfers files locally from the Web Server.
+
+ files: a list of file name strings
+ """
+ pass
+
+ def put(self, files):
+ """
+ Transfers files from the Web Server locally.
+
+ files: a list of file name strings
+ """
+ pass
+
+ def close(self):
+ """
+ This method should be called when the instance is no longer required.
+
+ Class's destructor calls this method.
+ """
+ pass