public function Archive_Tar::_translateWinPath in Drupal 7
Parameters
$p_path:
bool $p_remove_disk_letter:
Return value
string
4 calls to Archive_Tar::_translateWinPath()
- Archive_Tar::_addFile in modules/
system/ system.tar.inc - Archive_Tar::_addList in modules/
system/ system.tar.inc - Archive_Tar::_addString in modules/
system/ system.tar.inc - Archive_Tar::_extractList in modules/
system/ system.tar.inc
File
- modules/
system/ system.tar.inc, line 2568
Class
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;
}