CAUTION Assumes completion_directory_id is orginal_directory_id Create copy of file for task
(session,
directory,
completion_directory_id,
file,
copy_instance_list = False
)
| 136 | |
| 137 | |
| 138 | def copy_file(session, |
| 139 | directory, |
| 140 | completion_directory_id, |
| 141 | file, |
| 142 | copy_instance_list = False |
| 143 | ): |
| 144 | """ |
| 145 | CAUTION Assumes completion_directory_id is orginal_directory_id |
| 146 | |
| 147 | Create copy of file for task |
| 148 | """ |
| 149 | # TODO handle file "parent / child linking stuff |
| 150 | |
| 151 | new_file = File.copy_file_from_existing( |
| 152 | session = session, |
| 153 | working_dir = directory, |
| 154 | existing_file = file, |
| 155 | copy_instance_list = copy_instance_list, |
| 156 | add_link = False, |
| 157 | remove_link = False, |
| 158 | orginal_directory_id = completion_directory_id, |
| 159 | deep_copy = True, |
| 160 | ann_is_complete_reset = True |
| 161 | ) |
| 162 | |
| 163 | assert new_file != file |
| 164 | |
| 165 | return new_file |
no test coverage detected