original_string: public static function copyResources($dest, $force, $filename_path, $debug)
      {
          if (file_exists($filename_path)) {
              $destfolder = basename($filename_path);
              if (!file_exists(WEB_DIR . $dest . DIRECTORY_SEPARATOR . $destfolder) || $debug || $force) {
                  if (is_dir($filename_path)) {
                      self::copyr($filename_path, WEB_DIR . $dest . DIRECTORY_SEPARATOR . $destfolder);
                  } else {
                      if (@copy($filename_path, WEB_DIR . $dest . DIRECTORY_SEPARATOR . $destfolder) === FALSE) {
                          throw new ConfigException("Can't copy " . $filename_path . " to " . WEB_DIR . $dest . DIRECTORY_SEPARATOR . $destfolder);
                      }
                  }
              }
          }
      }
code: public static function copyResources($dest, $force, $filename_path, $debug)
      {
          if (file_exists($filename_path)) {
              $destfolder = basename($filename_path);
              if (!file_exists(WEB_DIR . $dest . DIRECTORY_SEPARATOR . $destfolder) || $debug || $force) {
                  if (is_dir($filename_path)) {
                      self::copyr($filename_path, WEB_DIR . $dest . DIRECTORY_SEPARATOR . $destfolder);
                  } else {
                      if (@copy($filename_path, WEB_DIR . $dest . DIRECTORY_SEPARATOR . $destfolder) === FALSE) {
                          throw new ConfigException("Can't copy " . $filename_path . " to " . WEB_DIR . $dest . DIRECTORY_SEPARATOR . $destfolder);
                      }
                  }
              }
          }
      }
code_tokens: public static function copyResources ( $ dest , $ force , $ filename_path , $ debug ) { if ( file_exists ( $ filename_path ) ) { $ destfolder = basename ( $ filename_path ) ; if ( ! file_exists ( WEB_DIR . $ dest . DIRECTORY_SEPARATOR . $ destfolder ) || $ debug || $ force ) { if ( is_dir ( $ filename_path ) ) { self :: copyr ( $ filename_path , WEB_DIR . $ dest . DIRECTORY_SEPARATOR . $ destfolder ) ; } else { if ( @ copy ( $ filename_path , WEB_DIR . $ dest . DIRECTORY_SEPARATOR . $ destfolder ) === FALSE ) { throw new ConfigException ( "Can't copy " . $ filename_path . " to " . WEB_DIR . $ dest . DIRECTORY_SEPARATOR . $ destfolder ) ; } } } } }
docstring: Method that copy resources recursively
  @param string $dest
  @param boolean $force
  @param $filename_path
  @param boolean $debug
docstring_tokens: Method that copy resources recursively