method copy documentation in bbn\File\System2

function(string $source, string $dest, bool $overwrite = false, bbn\File\System $fs = NULL) { if ( $this->check() ){ $nfs =& $this; if ( $fs ){ if ( !$fs->check() ){ return false; } $nfs =& $fs; } if ( $this->exists($source) && $nfs->exists(dirname($dest)) ){ if ( $nfs->exists($dest) ){ $dest_is_dir = $nfs->isDir($dest); if ( $dest_is_dir && $this->isFile($source) ){ $dest .= '/'.basename($source); } else if ( (!$dest_is_dir && !$overwrite) || ($dest_is_dir && (count($nfs->getFiles($dest, true, true)) > 0) && !$overwrite) ){ return false; } else{ $nfs->delete($dest); } } return $this->_copy($this->getRealPath($source), $nfs->getRealPath($dest)); } } return false; }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.