public function isWithin(\Coast\Path $parent)
    {
        $path = $this->_name;
        $parts = \explode(PATH_SEPARATOR, (string) $parent);    
        foreach ($parts as $part) {
            if (\preg_match('/^' . \preg_quote($part, '/') . '/', $path)) {
                return true;
            }
        }
        return false;
    }
public function isWithin(\Coast\Path $parent)
    {
        $path = $this->_name;
        $parts = \explode(PATH_SEPARATOR, (string) $parent);    
        foreach ($parts as $part) {
            if (\preg_match('/^' . \preg_quote($part, '/') . '/', $path)) {
                return true;
            }
        }
        return false;
    }
public function isWithin ( \ Coast \ Path $ parent ) { $ path = $ this -> _name ; $ parts = \ explode ( PATH_SEPARATOR , ( string ) $ parent ) ; foreach ( $ parts as $ part ) { if ( \ preg_match ( '/^' . \ preg_quote ( $ part , '/' ) . '/' , $ path ) ) { return true ; } } return false ; }
Check if path is within another
@param  Coast\Path $target path to check against.
@return bool
Check if path is within another