classes/phing/system/io/PhingFile.php
public function getParent()
    {
        // that's a lastIndexOf
        $index = ((($res = strrpos($this->path, self::$separator)) === false) ? -1 : $res);
        if ($index < $this->prefixLength) {
            if (($this->prefixLength > 0) && (strlen($this->path) > $this->prefixLength)) {
                return substr($this->path, 0, $this->prefixLength);
            }

            return null;
        }

        return substr($this->path, 0, $index);
    }
public function getParent()
    {
        // that's a lastIndexOf
        $index = ((($res = strrpos($this->path, self::$separator)) === false) ? -1 : $res);
        if ($index < $this->prefixLength) {
            if (($this->prefixLength > 0) && (strlen($this->path) > $this->prefixLength)) {
                return substr($this->path, 0, $this->prefixLength);
            }

            return null;
        }

        return substr($this->path, 0, $index);
    }
public function getParent ( ) { // that's a lastIndexOf $ index = ( ( ( $ res = strrpos ( $ this -> path , self :: $ separator ) ) === false ) ? - 1 : $ res ) ; if ( $ index < $ this -> prefixLength ) { if ( ( $ this -> prefixLength > 0 ) && ( strlen ( $ this -> path ) > $ this -> prefixLength ) ) { return substr ( $ this -> path , 0 , $ this -> prefixLength ) ; } return null ; } return substr ( $ this -> path , 0 , $ index ) ; }
Returns the pathname string of this abstract pathname's parent, or
null if this pathname does not name a parent directory.

The parent of an abstract pathname consists of the pathname's prefix,
if any, and each name in the pathname's name sequence except for the last.
If the name sequence is empty then the pathname does not name a parent
directory.

@return string $pathname string of the parent directory named by this
abstract pathname, or null if this pathname does not name a parent
Returns the pathname string of this abstract pathname s parent or null if this pathname does not name a parent directory .