Пример #1
0
 /**
  * Return clean version of a Subversion repository path betwenn ' and with file:// before
  *
  * @param string Path to repository
  * @return string absolute path to repository
  */
 public static function getRepositoryPath($path)
 {
     if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
         $newpath = realpath($path);
         if ($newpath === FALSE) {
             $path = str_replace('//', '/', str_replace('\\', '/', $path));
             $path = USVN_SVNUtils::getCannocialPath($path);
         } else {
             $path = $newpath;
         }
         return "\"file:///" . str_replace('\\', '/', $path) . "\"";
     }
     $newpath = realpath($path);
     if ($newpath === FALSE) {
         $newpath = USVN_SVNUtils::getCannocialPath($path);
     }
     return escapeshellarg('file://' . $newpath);
 }