drivendataorg / drivendataorg/cloudpathlib

Add a `dirs_exist_ok` parameter to the `copytree` implementation

Open
#144 0 comments 1 reaction 0 assignees View on GitHub
enhancement good first issue
Dominant language
Python
Stars
628
Forks
88
Avg merge
17h 28m
Merged PRs (30d)
2

Description

We could add a `dirs_exist_ok` parameter to copy tree. To do this, we would also need to raise on `mkdir` if dir exists for cloud implementations. For most clients `mkdir` is a no-op right now, so that logic would need to be added/tested.

---------

It seems like `shutil.copytree` has a `dirs_exist_ok` parameter that controls this `exist_ok`. Do we want to mimic that interface?

https://docs.python.org/3/library/shutil.html#shutil.copytree

_Originally posted by @jayqi in https://github.com/drivendataorg/cloudpathlib/pull/142#discussion_r634894797_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.