The src file is on the local disk.  Add it to FS at
the given dst name and the source is kept intact afterwards
434160
@Deprecated
  public void copyFromLocalFile(Path src, Path dst)
    throws IOException {
    copyFromLocalFile(false, true, false, src, dst);
  }
759139
def move_file(src, dst):
   
   # Sanity checkpoint
   src = re.sub('[^\w/\-\.\*]', '', src)
   dst = re.sub('[^\w/\-\.\*]', '', dst)
   if len(re.sub('[\W]', '', src)) < 5 or len(re.sub('[\W]', '', dst)) < 5:
      debug.log("Error: Moving file failed. Provided paths are invalid! src='%s' dst='%s'"%(src, dst))
   else:
      # Check destination
      check = False
      if dst[-1] == '/':
         if os.path.exists(dst):
            check = True # Valid Dir
         else:
            debug.log("Error: Moving file failed. Destination directory does not exist (%s)"%(dst)) #DEBUG
      elif os.path.exists(dst):
         if os.path.isdir(dst):
            check = True # Valid Dir
            dst += '/' # Add missing slash
         else:
            debug.log("Error: Moving file failed. %s exists!"%dst)
      elif os.path.exists(os.path.dirname(dst)):
         check = True # Valid file path
      else:
         debug.log("Error: Moving file failed. %s is an invalid distination!"%dst)
      if check:
         # Check source
         files = glob.glob(src)
         if len(files) != 0:
            debug.log("Moving File(s)...", "Move from %s"%src, "to %s"%dst)
            for file_ in files:
               # Check if file contains invalid symbols:
               invalid_chars = re.findall('[^\w/\-\.\*]', os.path.basename(file_))
               if invalid_chars:
                  debug.graceful_exit(("Error: File %s contains invalid "
                                      "characters %s!"
                                      )%(os.path.basename(file_), invalid_chars))
                  continue
               # Check file exists
               if os.path.isfile(file_):
                  debug.log("Moving file: %s"%file_)
                  shutil.move(file_, dst)
               else:
                  debug.log("Error: Moving file failed. %s is not a regular file!"%file_)
         else: debug.log("Error: Moving file failed. No files were found! (%s)"%src)
538405
def assign(self, dst, req, src):
        """"""
        if req == 'null':
            return
        elif req in ('write', 'inplace'):
            dst[:] = src
        elif req == 'add':
            dst[:] += src
785905
def copy(self, filename=None):
        
        dst = os.path.join(self.dst_path, filename)
        src = os.path.join(self.src_path, filename)
        dst_tmp = os.path.join(self.dst_tmp, filename)
        self.put(src=src, dst=dst_tmp, callback=self.update_progress, confirm=True)
        self.rename(src=dst_tmp, dst=dst)
260809
public void moveFromLocalFile(Path[] srcs, Path dst)
    throws IOException {
    copyFromLocalFile(true, true, false, srcs, dst);
  }
764359
function copyIfNotExists (src, dst) {
    if (!fs.existsSync(dst) && src) {
        fs.copySync(src, dst);
    }
}
743673
def mv_files(src, dst):
    
    # list the files in the src directory
    files = os.listdir(src)
    # loop for each file found
    for file in files:
        # move the file from the src to the dst
        shutil.move(os.path.join(src, file), os.path.join(dst, file))
    return
289524
public void copyToLocalFile(boolean delSrc, Path src, Path dst)
    throws IOException {
    fs.copyToLocalFile(delSrc, src, dst);
  }
142143
function (target, src) {
    var array = Array.isArray(src);
    var dst = array && [] || {};

    if (array) {
      target = target || [];
      dst = dst.concat(target);
      src.forEach(function(e, i) {
        if (typeof dst[i] === 'undefined') {
          dst[i] = e;
        } else if (typeof e === 'object') {
          dst[i] = Utils.merge(target[i], e);
        } else {
          if (target.indexOf(e) === -1) {
            dst.push(e);
          }
        }
      });
    } else {
      if (target && typeof target === 'object') {
        Object.keys(target).forEach(function (key) {
          dst[key] = target[key];
        })
      }
      Object.keys(src).forEach(function (key) {
        if (typeof src[key] !== 'object' || !src[key]) {
          dst[key] = src[key];
        }
        else {
          if (!target[key]) {
            dst[key] = src[key];
          } else {
            dst[key] = Utils.merge(target[key], src[key]);
          }
        }
      });
    }

    return dst;
  }
748687
def copy_files(src_dir, dst_dir, filespec='*', recursive=False):
    
    import os
    from .modules import copyfiles

    if src_dir == dst_dir:
        raise RuntimeError('copy_files() src and dst directories must be different.')

    if not os.path.isdir(src_dir):
        raise RuntimeError('copy_files() src directory "{}" does not exist.'.format(src_dir))

    return {
        'dependencies_fn': copyfiles.list_files,
        'compiler_fn': copyfiles.copy_files,
        'input': src_dir,
        'output': dst_dir,
        'kwargs': {
            'filespec': filespec,
            'recursive': recursive,
        },
    }
509651
def link(self, src, dst, label=None):
    
    dst = self._normalize(dst)
    self._tag(dst, label)
    self._ensure_parent(dst)
    abs_src = src
    abs_dst = os.path.join(self.chroot, dst)
    safe_copy(abs_src, abs_dst, overwrite=False)
419642
def src_to_dst(self, src_uri):
        
        m = re.match(self.src_uri + "/(.*)$", src_uri)
        if (m is None):
            return(None)
        rel_path = m.group(1)
        return(self.dst_path + '/' + rel_path)
577671
@Deprecated
  public void copyFromLocalFile(boolean delSrc, boolean overwrite, 
                                Path src, Path dst)
    throws IOException {
    copyFromLocalFile(delSrc, overwrite, false, src, dst);
  }
927129
def rel_href(src, dst):
  
  src_dir = os.path.dirname(src)
  return os.path.relpath(dst, src_dir)
389075
@Deprecated
  public void copyToLocalFile(Path src, Path dst) throws IOException {
    copyToLocalFile(false, false, src, dst);
  }
570819
def copyfile(src, dst):
    """"""
    if _samefile(src, dst):
        raise Error("`%s` and `%s` are the same file" % (src, dst))

    for fn in [src, dst]:
        try:
            st = os.stat(fn)
        except OSError:
            # File most likely does not exist
            pass
        else:
            # XXX What about other special files? (sockets, devices...)
            if stat.S_ISFIFO(st.st_mode):
                raise SpecialFileError("`%s` is a named pipe" % fn)

    with open(src, 'rb') as fsrc:
        with open(dst, 'wb') as fdst:
            copyfileobj(fsrc, fdst)
1099995
def copy_file(filename,dst_dir='/',dst_repo=self.repo,src_repo=self.repo)
      post_copy(src_repo,{"file_names"=>filename, "dst_repo" => dst_repo, "dst_dir"=>dst_dir})
    end