PclZipUtilRename

Advertisement

Syntax Syntax

PclZipUtilRename( $p_src,  $p_dest )

Source Source

File: wp-admin/includes/class-pclzip.php

  function PclZipUtilRename($p_src, $p_dest)
  {
    $v_result = 1;

    // ----- Try to rename the files
    if (!@rename($p_src, $p_dest)) {

      // ----- Try to copy & unlink the src
      if (!@copy($p_src, $p_dest)) {
        $v_result = 0;
      }
      else if (!@unlink($p_src)) {
        $v_result = 0;
      }
    }

    // ----- Return
    return $v_result;
  }

Advertisement

Advertisement

Leave a Reply