Factory method to select the right copier for a given source and destination.
542974
def Copier(source, destination):
    

    if source.type == 'local' and destination.type == 'local':
        return LocalCopier(source, destination)
    elif source.type == 'local' and destination.type == 'google_storage':
        return Local2GoogleStorageCopier(source, destination)
    elif source.type == 'google_storage' and destination.type == 'local':
        return GoogleStorage2LocalCopier(source, destination)
    elif source.type == 'google_storage' and destination.type == 'google_storage':
        return GoogleStorageCopier(source, destination)
    else:
        raise FileUtilsError('Could not find method to copy from source '\
                        '"%s" to destination "%s".' % (source, destination))
1320100
function copier(key, value, ignoredKeys, object) {
    if ( !ignoredKeys || !ignoredKeys.hasOwnProperty(key)) {
      object[key] = value;
    }
  }
1315808
def copy(self, selection, smart_selection_adaption=True):
        
        assert isinstance(selection, Selection)
        self.__create_core_and_model_object_copies(selection, smart_selection_adaption)
602674
function extend(destination, source) {
    for (var k in source) {
      if (source.hasOwnProperty(k)) {
        destination[k] = source[k];
      }
    }
    return destination;
  }
418239
def select_files_by_ifo_combination(ifocomb, insps):
    
    inspcomb = FileList()
    for ifo, ifile in zip(*insps.categorize_by_attr('ifo')):
        if ifo in ifocomb:
            inspcomb += ifile

    return inspcomb
298915
def copy(source):
    ""

    def do_copy(target):
        if source.__doc__:
            target.__doc__ = source.__doc__
        return target

    return do_copy
1005626
def recursive_copy(source, destination):
    
    if os.path.isdir(source):
        copy_tree(source, destination)
1080506
public static <SOURCE, TARGET> PropertyCopier<SOURCE, TARGET> getInstance(Typed<SOURCE> sourceType,
        Typed<TARGET> targetType, Mapping mapping, Matching matching) {
        return new FromFactory<>(Validate.notNull(sourceType, "sourceType"), Validate.notNull(targetType, "targetType"),
            mapping, matching);
    }
1061256
def MakeDestinationKey(directory, filename):
  """"""
  return utils.SmartStr(utils.JoinPath(directory, filename)).lstrip("/")
232904
def on_source_directory_chooser_clicked(self):
        """"""

        title = self.tr('Set the source directory for script and scenario')
        self.choose_directory(self.source_directory, title)
510484
def destination(globs, locator, distance, bearing):
    """"""
    globs.locations.destination(distance, bearing, locator)
245401
function (options) {
        var chosenConverter = this.getConverter(options.inputVersion, options.outputVersion);

        return chosenConverter.create(options);
    }
1237761
static void copy(final Configuration conf, final Arguments args
      ) throws IOException {
    DistCopier copier = getCopier(conf, args);
    
    if (copier != null) {
      try {
        JobClient client = copier.getJobClient();
        RunningJob job = client.submitJob(copier.getJobConf());
        try {
          if (!client.monitorAndPrintJob(copier.getJobConf(), job)) {
            throw new IOException("Job failed!");
          }
        } catch (InterruptedException ie) {
          Thread.currentThread().interrupt();
        }
        copier.finalizeCopiedFiles();
      } finally {
        copier.cleanupJob();
      }
    }
  }
315466
def _copy_file_or_directory(self, source, destination_directory):
    
    if os.path.isdir(source):
      for item in os.listdir(source):
        full_source = os.path.join(source, item)
        full_destination = os.path.join(destination_directory, item)
        shutil.copytree(full_source, full_destination)
    else:
      shutil.copy2(source, destination_directory)
865286
function (source, destination) {
    return cont.mapAsync(readFileAsJSON(source), function (json, cb) {
        json.copied = Date.now()
        fs.writeFile(destination, JSON.stringify(json), cb)
    })
}
551901
public <T extends Type> T selectCandidate(T candidate, T next, T actual, Environment environment) {
		// Found a viable candidate
		boolean left = subtypeOperator.isSubtype(candidate, next, environment);
		boolean right = subtypeOperator.isSubtype(next, candidate, environment);
		if (left && !right) {
			// Yes, is better than current candidate
			return next;
		} else if (right && !left) {
			return candidate;
		}
		// Unable to distinguish options based on subtyping alone
		left = isDerivation(next, actual);
		right = isDerivation(candidate, actual);
		if (left && !right) {
			// Yes, is better than current candidate
			return next;
		} else if (right && !left) {
			return candidate;
		} else {
			return null;
		}

	}
329564
def download(self, source, destination):
        """"""
        self._handler.download(posix_path(source), destination)