Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Tar.php

function Archive_Tar::_translateWinPath

Parameters

$p_path:

bool $p_remove_disk_letter:

Return value

string

4 calls to Archive_Tar::_translateWinPath()
Archive_Tar::_addFile in vendor/pear/archive_tar/Archive/Tar.php
Archive_Tar::_addList in vendor/pear/archive_tar/Archive/Tar.php
Archive_Tar::_addString in vendor/pear/archive_tar/Archive/Tar.php
Archive_Tar::_extractList in vendor/pear/archive_tar/Archive/Tar.php

File

vendor/pear/archive_tar/Archive/Tar.php, line 2514

Class

Archive_Tar
Creates a (compressed) Tar archive

Code

public function _translateWinPath($p_path, $p_remove_disk_letter = true) {
    if (defined('OS_WINDOWS') && OS_WINDOWS) {
        // ----- Look for potential disk letter
        if ($p_remove_disk_letter && ($v_position = strpos($p_path, ':')) != false) {
            $p_path = substr($p_path, $v_position + 1);
        }
        // ----- Change potential windows directory separator
        if (strpos($p_path, '\\') > 0 || substr($p_path, 0, 1) == '\\') {
            $p_path = strtr($p_path, '\\', '/');
        }
    }
    return $p_path;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal