(self, rename_from, rename_to, status_command, replace_command)
| 89 | self.ftp.sendcmd('RNTO '+ rename_to) |
| 90 | |
| 91 | def move_dir(self, rename_from, rename_to, status_command, replace_command): |
| 92 | if(self.is_there(rename_to) is True): |
| 93 | if(replace_command(rename_from, 'File/Folder exists in destination folder') is True): |
| 94 | self.delete_dir(rename_to, status_command) |
| 95 | else: |
| 96 | return |
| 97 | try: |
| 98 | self.ftp.sendcmd('RNFR '+ rename_from) |
| 99 | self.ftp.sendcmd('RNTO '+ rename_to) |
| 100 | status_command(rename_from, 'Moved') |
| 101 | except: |
| 102 | status_command(rename_from, 'Failed to move') |
| 103 | |
| 104 | def copy_file(self, file_dir, copy_from, file_size, status_command, replace_command): |
| 105 | #Change to script's directory |
no test coverage detected