make

@param string $src
@param string $dest

@return  string
424286
public function make($src, $dest)
    {
        $windows = PlatformHelper::isWindows();

        $src  = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $src);
        $dest = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $dest);

        if ($windows) {
            return exec("mklink /D {$dest} {$src}");
        } else {
            return exec("ln -s {$src} {$dest}");
        }
    }
747887
public function copyAs($dest)
    {
        $copy = new File($dest, $this->adapter);
        $copy->content($this->content());
        return $copy;
    }
1357077
public static boolean copyFile(final File src, final File dest)
    throws FileNotFoundException, IOException {
        return copyFile(src, dest, -1, true);
    }
950178
public function pipe($dest)
    {
        $source              = $this;
        $this->onMessage     = function ($source, $data) use ($dest) {
            $dest->send($data);
        };
        $this->onClose       = function ($source) use ($dest) {
            $dest->destroy();
        };
        $dest->onBufferFull  = function ($dest) use ($source) {
            $source->pauseRecv();
        };
        $dest->onBufferDrain = function ($dest) use ($source) {
            $source->resumeRecv();
        };
    }
996932
public function setDescription($desc)
    {
        $descAttribute = $this->descriptionAttribute;
        return is_string($descAttribute) ? $this->$descAttribute = $desc : null;
    }
1092638
public function redirect($dest, $code = 302)
    {
        if (!in_array($code, self::$redirect_codes)) {
            trigger_error("Invalid HTTP redirect code {$code}", E_USER_WARNING);
            $code = 302;
        }
        $this->setStatusCode($code);
        $this->addHeader('location', $dest);
        return $this;
    }
994711
protected function copy($source, $dest)
    {
        // Check for symlinks
        if ( is_link($source) ) {
            return symlink(readlink($source), $dest);
        }

        // Simple copy for a file
        if ( is_file($source) ) {

            if (!file_exists($dest)) {
                copy(
                    $source,
                    $dest
                );
                return;
            }

            copy($source, str_replace('.php', '.php.dist', $dest));
            return;
        }

        // Make destination directory
        if ( !is_dir($dest) ) {
            mkdir($dest);
        }

        // Loop through the folder
        $dir = dir($source);
        while (FALSE !== $entry = $dir->read()) {
            // Skip pointers
            if ( $entry == '.' || $entry == '..' ) {
                continue;
            }

            // Deep copy directories
            $this->copy("$source/$entry", "$dest/$entry");
        }

        // Clean up
        $dir->close();

        return TRUE;
    }
115924
function(src, dest) {
    var i = 0;
    var len = Math.min(src.length, dest.length);
    while(i < len) {
      dest[i] = src[i];
      i++;
    }
    return dest;
  }
18067
function(src, dest){
      self.logger.info('generating '+dest); 
      fs.createReadStream(src).pipe(fs.createWriteStream(dest)); 
    }
1164025
public static function copy(StreamInterface $src, StreamInterface $dest)
    {
        if ($src->isSeekable()) {
            $src->rewind();
        }

        while (!$src->eof()) {
            $dest->write($src->read(4096));
        }
    }
462808
public function copy_structure( Table $src, Table $dest ) {

		$src_table  = $this->database->quote_identifier( $src->name() );
		$dest_table = $this->database->quote_identifier( $dest->name() );
		$statement  = new \WpDbTools\Type\GenericStatement(
			"CREATE TABLE {$dest_table} LIKE {$src_table}"
		);

		// this will always return 0 even on error
		$this->database->query( $statement );

		return TRUE;
	}
407810
static function rename($src, $dest) {
        if (self::exists($dest)) {
            throw new \Lollipop\Exception\Runtime('File already exists: ' . $dest);
        }
        
        if (is_uploaded_file($src)) {
            return \move_uploaded_file($src, $dest);
        }
        
        return \rename($src, $dest);
    }
262839
public static function appendTo($src, $dest, $newline = false) {

        // Open the destination.
        $reader = @fopen($src, "r");
        if (false === $reader) {
            throw new FileNotFoundException($src);
        }

        // Open the destination.
        $writer = @fopen($dest, "a");
        if (false === $writer) {
            throw new IOException(sprintf("Failed to open \"%s\"", $dest));
        }

        // Append the source into destination.
        if (false === @file_put_contents($dest, $reader, FILE_APPEND)) {
            throw new IOException(sprintf("Failed to append \"%s\" into \"%s\"", $src, $dest));
        }

        // Append a new line.
        if (true === $newline && false === @file_put_contents($dest, "\n", FILE_APPEND)) {
            throw new IOException(sprintf("Failed to append \"%s\" into \"%s\"", $src, $dest));
        }

        // Close the files.
        if (false === @fclose($reader)) {
            throw new IOException(sprintf("Failed to close \"%s\"", $src));
        }
        if (false === @fclose($writer)) {
            throw new IOException(sprintf("Failed to close \"%s\"", $dest));
        }
    }
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;
                    }
                }
            }
        }
    }
215229
public function copy($srcId, $destId, $name)
    {
        $workspace = $this->session->getWorkspace();
        $srcPath = $this->normalizeToPath($srcId);
        $parentDestPath = $this->normalizeToPath($destId);
        $destPath = $parentDestPath . '/' . $name;

        $workspace->copy($srcPath, $destPath);

        return $destPath;
    }
200649
protected function copyTemplate($template, $dest)
    {
        $source = __DIR__.'/../../templates/'.$template;
        if (file_exists($source)) {
            return file_put_contents($dest, file_get_contents($source));
        }
    }
775685
public function rsyncCommand($src, $dest, array $rsyncOptions)
    {
        if (strpos($src, ':') !== false) {
            $site_env_id = $this->getSiteEnvIdFromPath($src);
            $src = $this->removeSiteEnvIdFromPath($src);
        } else {
            $site_env_id = $this->getSiteEnvIdFromPath($dest);
            $dest = $this->removeSiteEnvIdFromPath($dest);
        }

        return $this->rsync($site_env_id, $src, $dest, $rsyncOptions);
    }