code: def symlink(source, target, isfile=True):
      
      from fortpy.code import config
      from os import path
      if config.symlink:
          from os import symlink, remove
          if path.isfile(target) or path.islink(target):
              remove(target)
          elif path.isdir(target):
              msg.warn("Cannot auto-delete directory '{}' for symlinking.".format(target))
              return
          symlink(source, target)
      else:
          msg.info("   COPY: {}".format(source))
          if isfile:
              copyfile(source, target)
          else:
              copy(source, target)
docs: Creates a symlink at target *file* pointing to source.
  
      :arg isfile: when True, if symlinking is disabled in the global config, the file
        is copied instead with fortpy.utility.copyfile; otherwise fortpy.utility.copy
        is used and the target is considered a directory.