original_string: public static function recursiveCopy($src, $dst)
      {
          if (is_dir($src)) {
              if (!is_dir($dst) && !mkdir($dst)) {
                  throw new IOException("Cannot mkdir '$dst'", 0, null, $path);
              }
              $files = scandir($src);
              foreach ($files as $file) {
                  if ($file != "." && $file != "..") {
                      self::recursiveCopy("$src/$file", "$dst/$file");
                  }
              }
          } elseif (file_exists($src)) {
              if (!copy($src, $dst)) {
                  throw new IOException("Cannot copy '$src' to '$dst'", 0, null, $src);
              }
          }
      }
code: public static function recursiveCopy($src, $dst)
      {
          if (is_dir($src)) {
              if (!is_dir($dst) && !mkdir($dst)) {
                  throw new IOException("Cannot mkdir '$dst'", 0, null, $path);
              }
              $files = scandir($src);
              foreach ($files as $file) {
                  if ($file != "." && $file != "..") {
                      self::recursiveCopy("$src/$file", "$dst/$file");
                  }
              }
          } elseif (file_exists($src)) {
              if (!copy($src, $dst)) {
                  throw new IOException("Cannot copy '$src' to '$dst'", 0, null, $src);
              }
          }
      }
code_tokens: public static function recursiveCopy ( $ src , $ dst ) { if ( is_dir ( $ src ) ) { if ( ! is_dir ( $ dst ) && ! mkdir ( $ dst ) ) { throw new IOException ( "Cannot mkdir '$dst'" , 0 , null , $ path ) ; } $ files = scandir ( $ src ) ; foreach ( $ files as $ file ) { if ( $ file != "." && $ file != ".." ) { self :: recursiveCopy ( "$src/$file" , "$dst/$file" ) ; } } } elseif ( file_exists ( $ src ) ) { if ( ! copy ( $ src , $ dst ) ) { throw new IOException ( "Cannot copy '$src' to '$dst'" , 0 , null , $ src ) ; } } }
docstring: cp -r
docstring_tokens: cp - r