function Archive_Tar::_translateWinPath
7.x system.tar.inc | Archive_Tar::_translateWinPath($p_path, $p_remove_disk_letter = true) |
4 calls to Archive_Tar::_translateWinPath()
- Archive_Tar::_addFile in drupal-7.x/
modules/ system/ system.tar.inc - Archive_Tar::_addList in drupal-7.x/
modules/ system/ system.tar.inc - Archive_Tar::_addString in drupal-7.x/
modules/ system/ system.tar.inc - Archive_Tar::_extractList in drupal-7.x/
modules/ system/ system.tar.inc
File
- drupal-7.x/
modules/ system/ system.tar.inc, line 1874
Class
- Archive_Tar
- Creates a (compressed) Tar archive *
Code
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;
}