parameters: (dest, src, symlinks=True)
docstring: If symlinks (is true), then a symbolic link will be
      shallow copied and recreated as a symbolic link; otherwise, copying
      a symbolic link will be equivalent to copying the symbolic link's
      final target regardless of symbolic link depth.
docstring_summary: If symlinks (is true), then a symbolic link will be
      shallow copied and recreated as a symbolic link; otherwise, copying
      a symbolic link will be equivalent to copying the symbolic link's
      final target regardless of symbolic link depth.
docstring_tokens: If symlinks ( is true ) then a symbolic link will be shallow copied and recreated as a symbolic link ; otherwise copying a symbolic link will be equivalent to copying the symbolic link s final target regardless of symbolic link depth .
function: def copy_func(dest, src, symlinks=True):
      """
      If symlinks (is true), then a symbolic link will be
      shallow copied and recreated as a symbolic link; otherwise, copying
      a symbolic link will be equivalent to copying the symbolic link's
      final target regardless of symbolic link depth.
      """
  
      dest = str(dest)
      src = str(src)
  
      SCons.Node.FS.invalidate_node_memos(dest)
      if SCons.Util.is_List(src) and os.path.isdir(dest):
          for file in src:
              shutil.copy2(file, dest)
          return 0
      elif os.path.islink(src):
          if symlinks:
              return os.symlink(os.readlink(src), dest)
          else:
              return copy_func(dest, os.path.realpath(src))
      elif os.path.isfile(src):
          return shutil.copy2(src, dest)
      else:
          return shutil.copytree(src, dest, symlinks)
function_tokens: def copy_func ( dest , src , symlinks = True ) : dest = str ( dest ) src = str ( src ) SCons . Node . FS . invalidate_node_memos ( dest ) if SCons . Util . is_List ( src ) and os . path . isdir ( dest ) : for file in src : shutil . copy2 ( file , dest ) return 0 elif os . path . islink ( src ) : if symlinks : return os . symlink ( os . readlink ( src ) , dest ) else : return copy_func ( dest , os . path . realpath ( src ) ) elif os . path . isfile ( src ) : return shutil . copy2 ( src , dest ) else : return shutil . copytree ( src , dest , symlinks )