(self, ftpController, file_list, detailed_file_list, selected_file_indices)
| 972 | self.process_thread_requests() |
| 973 | |
| 974 | def delete_item(self, ftpController, file_list, detailed_file_list, selected_file_indices): |
| 975 | #Thread safe progress function |
| 976 | def progress(file_name, status): |
| 977 | thread_request_queue.put(lambda:self.progress(file_name, status)) |
| 978 | #Loop through all selected files and folders |
| 979 | for index in selected_file_indices: |
| 980 | file_name = ftpController.cwd_parent(file_list[index]) |
| 981 | #If directory |
| 982 | if(self.ftpController.is_dir(detailed_file_list[index])): |
| 983 | ftpController.delete_dir(file_name, progress) |
| 984 | #If file |
| 985 | else: |
| 986 | ftpController.delete_file(file_name, progress) |
| 987 | #Deselect everything |
| 988 | thread_request_queue.put(lambda:self.deselect_everything) |
| 989 | #Update file list and redraw icons |
| 990 | thread_request_queue.put(lambda:self.update_file_list()) |
| 991 | thread_request_queue.put(lambda:self.update_status(' ')) |
| 992 | thread_request_queue.put(lambda:self.progress('You can now close the window', 'Done')) |
| 993 | thread_request_queue.put(lambda:self.console_window.enable_close_button()) |
| 994 | thread_request_queue.put(lambda:self.deselect_everything()) |
| 995 | |
| 996 | |
| 997 |
nothing calls this directly
no test coverage detected