The full BioPHP library file: BiO.php
From Biophp_net
#!/usr/bin/php
- -------------------------------------------------------------------------------
- Title : BiO.php
- Usage : use it as a source library for BioPHP project.
- Function : This is the Biophp library.
- Example :
- Keywords : BioPHP
- Options :
- Author : Jong Bhak, j@bio.cc
# Category : library
- Reference :
- Returns :
- Version : 20071225
- ------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
- Title : copy_folder
- Usage :
- Function :
- Example :
- Keywords :
- Options :
- Author : swizec at swizec dot com
- Category :
- Reference :
- Returns :
- Version : 20071225
- ------------------------------------------------------------------------------
function copy_folder( $source, $target ){
if ( is_dir( $source ) ){
@mkdir( $target );
$d = dir( $source );
while ( FALSE !== ( $entry = $d->read() ) ) {
if ( $entry == '.' || $entry == '..' ){
continue;
}
$Entry = $source . '/' . $entry;
if ( is_dir( $Entry ) ){
full_copy( $Entry, $target . '/' . $entry );
continue;
}
copy( $Entry, $target . '/' . $entry );
}
$d->close();
}else {
copy( $source, $target );
}
}



