kopia lustrzana https://github.com/OpenDroneMap/ODM
added copy method to io.py
rodzic
d758a5a2ed
commit
e7b316f808
10
opendm/io.py
10
opendm/io.py
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import shutil, errno
|
||||
|
||||
|
||||
def get_files_list(path_dir):
|
||||
|
@ -30,3 +31,12 @@ def file_exists(path_file):
|
|||
|
||||
def dir_exists(dirname):
|
||||
return os.path.isdir(dirname)
|
||||
|
||||
|
||||
def copy(src, dst):
|
||||
try:
|
||||
shutil.copytree(src, dst)
|
||||
except OSError as e:
|
||||
if e.errno == errno.ENOTDIR:
|
||||
shutil.copy(src, dst)
|
||||
else: raise
|
||||
|
|
Ładowanie…
Reference in New Issue