Removes an existing directory.
(path)
| 208 | |
| 209 | |
| 210 | def delete_directory(path): |
| 211 | """ Removes an existing directory. """ |
| 212 | if os.path.exists(path): |
| 213 | msg("Removing directory %s" % (path)) |
| 214 | if not options.dryrun: |
| 215 | shutil.rmtree(path, onerror=onerror) |
| 216 | |
| 217 | |
| 218 | def copy_directory(source, target, allow_overwrite=False): |