You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we need to copy a file to a directory and I use src.copy(dst) I get a IsADirectoryError: [Errno 21] Is a directory error from shutil.copyfile. This means I cannot do a simple operation of coping a file to another directory using the Path object, which can be done by using shutil.copy.
Why don't we use shutil.copy instead of shutil.copyfile so the basic copy operation too can be executed ?
The text was updated successfully, but these errors were encountered:
When we need to copy a file to a directory and I use
src.copy(dst)
I get aIsADirectoryError: [Errno 21] Is a directory
error fromshutil.copyfile
. This means I cannot do a simple operation of coping a file to another directory using thePath
object, which can be done by usingshutil.copy
.Why don't we use
shutil.copy
instead ofshutil.copyfile
so the basic copy operation too can be executed ?The text was updated successfully, but these errors were encountered: