original_string: protected function copy_data(array $path, array $destination) {
          global $CFG;
          $filename = array_pop($destination);
          $destdirectory = implode(DIRECTORY_SEPARATOR, $destination);
          $fulldestination = $this->path . DIRECTORY_SEPARATOR . $destdirectory;
          check_dir_exists($fulldestination, true, true);
          $fulldestination .= $filename;
          $currentpath = $CFG->dirroot . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $path);
          copy($currentpath, $fulldestination);
          $this->files[$destdirectory . DIRECTORY_SEPARATOR . $filename] = $fulldestination;
      }
code: protected function copy_data(array $path, array $destination) {
          global $CFG;
          $filename = array_pop($destination);
          $destdirectory = implode(DIRECTORY_SEPARATOR, $destination);
          $fulldestination = $this->path . DIRECTORY_SEPARATOR . $destdirectory;
          check_dir_exists($fulldestination, true, true);
          $fulldestination .= $filename;
          $currentpath = $CFG->dirroot . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $path);
          copy($currentpath, $fulldestination);
          $this->files[$destdirectory . DIRECTORY_SEPARATOR . $filename] = $fulldestination;
      }
code_tokens: protected function copy_data ( array $ path , array $ destination ) { global $ CFG ; $ filename = array_pop ( $ destination ) ; $ destdirectory = implode ( DIRECTORY_SEPARATOR , $ destination ) ; $ fulldestination = $ this -> path . DIRECTORY_SEPARATOR . $ destdirectory ; check_dir_exists ( $ fulldestination , true , true ) ; $ fulldestination .= $ filename ; $ currentpath = $ CFG -> dirroot . DIRECTORY_SEPARATOR . implode ( DIRECTORY_SEPARATOR , $ path ) ; copy ( $ currentpath , $ fulldestination ) ; $ this -> files [ $ destdirectory . DIRECTORY_SEPARATOR . $ filename ] = $ fulldestination ; }
docstring: Copy a file to the specified path.
  
  @param  array  $path        Current location of the file.
  @param  array  $destination Destination path to copy the file to.
docstring_tokens: Copy a file to the specified path .