(src, dest, skip=None)
Hard link or copy all of the files in the path src into the path dest.
        Subdirectories are created as needed, and files in dest are overwritten.
Hard link or copy all of the files in the path src into the path dest.
        Subdirectories are created as needed, and files in dest are overwritten.
Hard link or copy all of the files in the path src into the path dest . Subdirectories are created as needed and files in dest are overwritten .
def _stage_files_recursive(src, dest, skip=None):
        """Hard link or copy all of the files in the path src into the path dest.
        Subdirectories are created as needed, and files in dest are overwritten."""
        # Use hard links if they are supported on this system.
        if hasattr(os, "link"):
            link = "hard"
        elif hasattr(os, "symlink"):
            link = "sym"
        else:
            link = None

        for dirpath, dirnames, filenames in os.walk(src, followlinks=True):
            if not any(p.startswith(".") for p in dirpath.split(os.sep)):
                dest_dirpath = os.path.join(
                    dest, dirpath.split(src, 1)[1].lstrip(os.sep)
                )
                mkpath(dest_dirpath)
                for filename in filenames:
                    if not filename.startswith("."):
                        src_path = os.path.join(dirpath, filename)
                        dest_path = os.path.join(dest_dirpath, filename)
                        if not os.path.exists(dest_path):
                            copy_file(
                                os.path.join(dirpath, filename),
                                os.path.join(dest_dirpath, filename),
                            )
def _stage_files_recursive ( src , dest , skip = None ) : # Use hard links if they are supported on this system. if hasattr ( os , "link" ) : link = "hard" elif hasattr ( os , "symlink" ) : link = "sym" else : link = None for dirpath , dirnames , filenames in os . walk ( src , followlinks = True ) : if not any ( p . startswith ( "." ) for p in dirpath . split ( os . sep ) ) : dest_dirpath = os . path . join ( dest , dirpath . split ( src , 1 ) [ 1 ] . lstrip ( os . sep ) ) mkpath ( dest_dirpath ) for filename in filenames : if not filename . startswith ( "." ) : src_path = os . path . join ( dirpath , filename ) dest_path = os . path . join ( dest_dirpath , filename ) if not os . path . exists ( dest_path ) : copy_file ( os . path . join ( dirpath , filename ) , os . path . join ( dest_dirpath , filename ) , )