public function copy($sourcePath, $destinationPath)
    {
        $sourceNode = $this->getNodeForPath($sourcePath);

        // grab the dirname and basename components
        list($destinationDir, $destinationName) = Uri\split($destinationPath);

        $destinationParent = $this->getNodeForPath($destinationDir);
        // Check if the target can handle the copy itself. If not, we do it ourselves.
        if (!$destinationParent instanceof ICopyTarget || !$destinationParent->copyInto($destinationName, $sourcePath, $sourceNode)) {
            $this->copyNode($sourceNode, $destinationParent, $destinationName);
        }

        $this->markDirty($destinationDir);
    }
public function copy($sourcePath, $destinationPath)
    {
        $sourceNode = $this->getNodeForPath($sourcePath);

        // grab the dirname and basename components
        list($destinationDir, $destinationName) = Uri\split($destinationPath);

        $destinationParent = $this->getNodeForPath($destinationDir);
        // Check if the target can handle the copy itself. If not, we do it ourselves.
        if (!$destinationParent instanceof ICopyTarget || !$destinationParent->copyInto($destinationName, $sourcePath, $sourceNode)) {
            $this->copyNode($sourceNode, $destinationParent, $destinationName);
        }

        $this->markDirty($destinationDir);
    }
public function copy ( $ sourcePath , $ destinationPath ) { $ sourceNode = $ this -> getNodeForPath ( $ sourcePath ) ; // grab the dirname and basename components list ( $ destinationDir , $ destinationName ) = Uri \ split ( $ destinationPath ) ; $ destinationParent = $ this -> getNodeForPath ( $ destinationDir ) ; // Check if the target can handle the copy itself. If not, we do it ourselves. if ( ! $ destinationParent instanceof ICopyTarget || ! $ destinationParent -> copyInto ( $ destinationName , $ sourcePath , $ sourceNode ) ) { $ this -> copyNode ( $ sourceNode , $ destinationParent , $ destinationName ) ; } $ this -> markDirty ( $ destinationDir ) ; }
Copies a file from path to another.

@param string $sourcePath      The source location
@param string $destinationPath The full destination path
Copies a file from path to another .