protected function _copy( $path, $to )
    {
        if ( is_file( $to ) )
        {
            return false;
        }

        $iterator = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator( $path,
                RecursiveDirectoryIterator::CURRENT_AS_FILEINFO |
                RecursiveDirectoryIterator::SKIP_DOTS
            ),
            RecursiveIteratorIterator::SELF_FIRST
        );

        $result = is_dir( $to ) ? true : @ mkdir( $to );

        foreach ( $iterator as $info )
        {
            $toPath = $to . '/' . $iterator->getSubPathName();

            switch ( true )
            {
                case $info->isFile():
                    $result = $result && @ copy( $info->getPathname(), $toPath );
                    break;

                case $info->isDir():
                    $result = $result && @ mkdir( $toPath, 0777 );
                    break;
            }
        }

        return $result;
    }