@param $src
@param $dst

@return mixed
966403
public function moveFile($src, $dst)
    {
        $this->returnCode = 'no';

        return $this->send('v-move-fs-file', $this->userName, $src, $dst);
    }
992647
private function recursiveCopy($src, $dst)
    {
        @mkdir($dst, 0755);

        $iterator = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        foreach ($iterator as $file) {
            if ($file->isDir()) {
                @mkdir($dst.'/'.$iterator->getSubPathName());
            } else {
                $success = copy($file, $dst.'/'.$iterator->getSubPathName());
                if ($success) {
                    if (! $this->silent) {
                        echo 'copied: '.$dst.'/'.$iterator->getSubPathName().PHP_EOL;
                    }
                }
            }
        }
    }
1025988
def dst_to_src(self, dst_file):
        
        m = re.match(self.dst_path + "/(.*)$", dst_file)
        if (m is None):
            return(None)
        rel_path = m.group(1)
        return(self.src_uri + '/' + rel_path)
1196179
protected function copy($src, $dest)
    {
        if (!is_file($src) && !is_dir($src)) {
            return 'Source File or dir not found: ' . $src;
        }

        if (is_file($src)) {
            File::copy($src, $dest, true);
        } elseif (is_dir($src)) {
            Folder::copy($src, $dest, true);
        }

        return sprintf('Copy %s ===> %s', $src, $dest);
    }
599103
private function copy($src, $dst, $force = false, $chmod = 0777) {
        $path = pathinfo($dst);
        if ( ! is_dir($path['dirname']) || $force) {
            @mkdir($path['dirname'], $chmod, true);
        }
        if ( ! file_exists($dst) || $force) {
            @copy($src, $dst);
        }
    }
1306763
public function rename($dst, $mode=null) {
		if(!$this->src || $this->isAt($dst)) return;
		$filename = \Asgard\File\FileSystem::rename($this->src, $dst, $mode);
		if(!$filename)
			return false;
		$this->src = realpath($filename);
		$this->name = null;
		return $dst;
	}
1370962
function shallowCopy(src, dst) {
  dst = dst || {};

  for(var key in src) {
    if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') {
      dst[key] = src[key];
    }
  }

  return dst;
}
1086673
public function extractZip($zip, $dst) {

        if ( $this->zip->open($zip) == TRUE ) {
           return $this->zip->extractTo($dst);
        }
        return false;
    }
1021224
public function get($src, $dest){
		if ( $src = $this->checkFilePath($src) &&
            ftp_get($this->cn, $dest, $src, FTP_BINARY) ){
      return true;
		}
		return false;
	}
438163
public function copy($dst, $mode=null) {
		$dst = \Asgard\File\FileSystem::copy($this->src, $dst, $mode);
		if($dst) {
			$copy = clone $this;
			$copy->setSrc($dst);
			return $copy;
		}
		return false;
	}
457159
public function dirMove($src, $dst, $overwrite = false)
    {
        $src = $this->alias->resolve($src);
        $dst = $this->alias->resolve($dst);

        if (!$overwrite && is_dir($dst)) {
            throw new RuntimeException(['move `:src` to `:dst` failed: destination directory is exists already', 'src' => $src, 'dst' => $dst]);
        }

        if (!is_dir($dir = dirname($dst))) {
            $this->_dirCreate($dir);
        }

        if (!rename($src, $dst)) {
            throw new RuntimeException(['move `:src` directory to `:dst` directory failed: :last_error_message', 'src' => $src, 'dst' => $dst]);
        }
    }
297874
protected function recursiveCopy($src,$dst)
    {
        if($this->isZip($src)) { 
            $this->extractZip($src, $this->getInstallDir());
            return;
        }
        $dir = opendir($src); 
        if(!is_dir($dst)) {
            mkdir($dst);
        }
        while(false !== ( $file = readdir($dir)) ) { 
            if (( $file != '.' ) && ( $file != '..' )) { 
                if ( is_dir($src . '/' . $file) ) { 
                    recursiveCopy($src . '/' . $file,$dst . '/' . $file); 
                } 
                else { 
                    copy($src . '/' . $file,$dst . '/' . $file); 
                } 
            } 
        } 
        closedir($dir); 
    }
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)
1177706
public static function mkdir($dst, $mode = null, $recursive = false)
    {
        if ($mode === null) {
            $mode = 0777;
        }
        $prevDir = dirname($dst);
        if ($recursive && !is_dir($dst) && !is_dir($prevDir)) {
            self::mkdir(dirname($dst), $mode, true);
        }
        $res = mkdir($dst, $mode);
        @chmod($dst, $mode);
        return $res;
    }
1213838
public static long copyFile(File dst, File src) throws IOException {
		long copied;

		try (FileInputStream srcStream = new FileInputStream(src)) {
			copied = copyStream(dst, srcStream);
		}
		return copied;
	}
602898
public function paste($volume, $src, $dst, $rmSrc = false) {
		$err = $rmSrc ? elFinder::ERROR_MOVE : elFinder::ERROR_COPY;
		
		if ($this->commandDisabled('paste')) {
			return $this->setError($err, '#'.$src, elFinder::ERROR_PERM_DENIED);
		}

		if (($file = $volume->file($src, $rmSrc)) == false) {
			return $this->setError($err, '#'.$src, elFinder::ERROR_FILE_NOT_FOUND);
		}

		$name = $file['name'];
		$errpath = $volume->path($src);
		
		if (($dir = $this->dir($dst)) == false) {
			return $this->setError($err, $errpath, elFinder::ERROR_TRGDIR_NOT_FOUND, '#'.$dst);
		}
		
		if (!$dir['write'] || !$file['read']) {
			return $this->setError($err, $errpath, elFinder::ERROR_PERM_DENIED);
		}

		$destination = $this->decode($dst);

		if (($test = $volume->closest($src, $rmSrc ? 'locked' : 'read', $rmSrc))) {
			return $rmSrc
				? $this->setError($err, $errpath, elFinder::ERROR_LOCKED, $volume->path($test))
				: $this->setError($err, $errpath, elFinder::ERROR_PERM_DENIED);
		}

		$test = $this->joinPathCE($destination, $name);
		$stat = $this->stat($test);
		$this->clearcache();
		if ($stat) {
			if ($this->options['copyOverwrite']) {
				// do not replace file with dir or dir with file
				if (!$this->isSameType($file['mime'], $stat['mime'])) {
					return $this->setError(elFinder::ERROR_NOT_REPLACE, $this->path($test));
				}
				// existed file is not writable
				if (!$stat['write']) {
					return $this->setError($err, $errpath, elFinder::ERROR_PERM_DENIED);
				}
				// existed file locked or has locked child
				if (($locked = $this->closestByAttr($test, 'locked', true))) {
					return $this->setError(elFinder::ERROR_LOCKED, $this->path($locked));
				}
				// target is entity file of alias
				if ($volume == $this && ($test == @$file['target'] || $test == $this->decode($src))) {
					return $this->setError(elFinder::ERROR_REPLACE, $errpath);
				}
				// remove existed file
				if (!$this->remove($test)) {
					return $this->setError(elFinder::ERROR_REPLACE, $this->path($test));
				}
			} else {
				$name = $this->uniqueName($destination, $name, ' ', false);
			}
		}
		
		// copy/move inside current volume
		if ($volume == $this) {
			$source = $this->decode($src);
			// do not copy into itself
			if ($this->inpathCE($destination, $source)) {
				return $this->setError(elFinder::ERROR_COPY_INTO_ITSELF, $errpath);
			}
			$method = $rmSrc ? 'move' : 'copy';
			return ($path = $this->$method($source, $destination, $name)) ? $this->stat($path) : false;
		}
		
		// copy/move from another volume
		if (!$this->options['copyTo'] || !$volume->copyFromAllowed()) {
			return $this->setError(elFinder::ERROR_COPY, $errpath, elFinder::ERROR_PERM_DENIED);
		}
		
		if (($path = $this->copyFrom($volume, $src, $destination, $name)) == false) {
			return false;
		}
		
		if ($rmSrc) {
			if ($volume->rm($src)) {
				$this->removed[] = $file;
			} else {
				return $this->setError(elFinder::ERROR_MOVE, $errpath, elFinder::ERROR_RM_SRC);
			}
		}
		return $this->stat($path);
	}
82512
public function renameRow(string $src, string $dst): bool
    {
        if (null === $this->data) {
            $this->buildIndex();
        }

        if ($this->hasKey($dst)) {
            throw new \RuntimeException("Cannot rename object: key '{$dst}' is already taken");
        }

        if (!$this->hasKey($src)) {
            return false;
        }

        // Change single key in the array without changing the order or value.
        $keys = array_keys($this->data);
        $keys[array_search($src, $keys, true)] = $dst;

        $this->data = array_combine($keys, $this->data);

        return true;
    }