Beispiel #1
0
 /**
  * @return string The path of the file's parent directory
  */
 public function getParentPath()
 {
     if ($this->isRoot()) {
         return $this->path;
     }
     $urlParts = $this->getURLComponents();
     $urlParts['path'] = AdvancedPathLib::dirname($urlParts['path']);
     return AdvancedPathLib::buildUrl($urlParts);
 }
Beispiel #2
0
 /**
  * @return string The path of the file's parent directory
  */
 public function getParentPath()
 {
     if (preg_match('/^[a-z]{1}:\\/?$/i', AdvancedPathLib::getPhpLocalHackPath($this->path))) {
         return $this->getAbsolutePath();
         //if the path is the root of a Windows drive, return itself
     }
     $urlParts = $this->getURLComponents();
     $urlParts['path'] = AdvancedPathLib::dirname($urlParts['path']);
     return AdvancedPathLib::buildUrl($urlParts);
 }