def __init__(self, url, password, server, fileList): FileConnector.__init__(self, url, password, server, fileList) self.remoteFilePath = self.fileList[0] if len(self.fileList) == 2: self.localFilePath = self.fileList[1] else: self.localFilePath = ''
def __init__(self, url, password, server, fileList, timeout): FileConnector.__init__(self, url, password, server, fileList, timeout) self.remoteFilePath = self.fileList[0] if len(self.fileList) == 2: self.localFilePath = self.fileList[1] else: self.localFilePath = os.path.basename(self.remoteFilePath)
def launch(self): if FileConnector.launch(self) != 'fail': if self.downloadFile(): print '+ Downloading Successful' print '' else: print '+ Downloading Failed' print ''
def launch(self): if FileConnector.launch(self) != 'fail': if self.downloadFile(): print '+ Downloading Successful' print '' else: print '+ Downloading Failed' print '' else: print 'Error: File opreation can not work' print ''
def launch(self): if FileConnector.launch(self) != 'fail': self.uploadFile()
def launch(self): if FileConnector.launch(self) != 'fail': self.uploadFile() else: print 'Error: File opreation can not work' print ''
def __init__(self, url, password, server, fileList, timeout): FileConnector.__init__(self, url, password, server, fileList, timeout) self.localFilePath = self.fileList[0] self.remoteFilePath = self.fileList[1]