Determine if this path is an ancestor of the supplied path.

@param AbsolutePathInterface $path The child path.

@return boolean True if this path is an ancestor of the supplied path.
1035
public function isAncestorOf(AbsolutePathInterface $path)
    {
        if (!$this->matchesDriveOrNull($this->pathDriveSpecifier($path))) {
            return false;
        }

        return parent::isAncestorOf($path);
    }
578828
public static function isAbsolute($path, $separator = null)
    {
        $separator = $separator ?: self::getDirectorySeparator();
        $unified = self::unify($path, $separator);

        return preg_match('#^' . preg_quote($separator, '#') . '.*#', $unified)
            || preg_match('#^[a-zA-Z]{1}:.*#', $unified);
    }
551735
static function isAbsolute($path)
    {
        if (realpath($path) === $path) {
            return true;
        }

        if (empty($path)) {
            return false;
        }

        # Absolute Path (Unix) or Absolute UNC Path.
        if ($path[0] === '/' or $path[0] === '\\') {
            return true;
        }

        # If the path starts with a drive letter or "\\" (Windows):
        if (static::isWindows() and preg_match('#^([a-z]\:)?\\\\{1,2}#i', $path)) {
            return true;
        }
        return false;
    }
702487
public function isAbsolute($path)
    {
        $firstChar = substr($path, 0, 1);
        if ('/' === $firstChar || '\\' === $firstChar) {
            return true;
        }
        $isLetter = (
            ($firstChar >= 'A' && $firstChar <= 'Z') ||
            ($firstChar >= 'a' && $firstChar <= 'z')
        );
        $path = substr($path, 1, 2);
        return $isLetter && (':/' === $path || ':\\' === $path);
    }
481011
public function isDir($path)
    {
        $node = $this->at($path);
        return null !== $node && 'dir' === $node->type;
    }
1253453
protected function isWithinFilesystem($path)
    {
        $pathUrl = new Url($path);
        $fsUrl = $this->filesystem->url();

        if (!$pathUrl->scheme) {
            $pathUrl = $pathUrl->scheme('file');
        }

        if (!$fsUrl->scheme) {
            $fsUrl = $fsUrl->scheme('file');
        }

        if ($pathUrl->scheme != $fsUrl->scheme) {
            return false;
        }

        if (Helper::startsWith("$pathUrl->path", "$fsUrl->path")) {
            return true;
        }

        return $this->filesystem->exists($path);
    }
1090507
public boolean isAbsolute(LocPathIterator path)
  {
  	int analysis = path.getAnalysisBits();
    boolean isAbs = (WalkerFactory.isSet(analysis, WalkerFactory.BIT_ROOT) || 
           WalkerFactory.isSet(analysis, WalkerFactory.BIT_ANY_DESCENDANT_FROM_ROOT));
    if(isAbs)
    {
    	isAbs = m_absPathChecker.checkAbsolute(path);
    }
    return isAbs;
  }
365293
public function isdir( $path )
	{
		return in_array( basename( $path ), $this->fs->directories( dirname( $path ) ) );
	}
30597
public static function executable($path)
    {
        $path = Normalize::diskFullPath($path);

        if (!self::exist($path)) {
            return false;
        }

        return is_executable($path);
    }
174074
public function setRootPath($path) {

		$path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

		if(!is_null($this->absoluteAssetsPath) && 0 !== strpos($this->absoluteAssetsPath, $path)) {
			throw new ApplicationException("'$path' not a parent of assets path '{$this->absoluteAssetsPath}'", ApplicationException::PATH_MISMATCH);
		}

		$this->rootPath = $path;
		$this->relativeAssetsPath = str_replace(DIRECTORY_SEPARATOR, '/', str_replace($this->rootPath, '', (string) $this->absoluteAssetsPath));

		return $this;

	}
369184
protected function checkPath($path)
    {
        foreach ($this->chroots as $chroot) {
            if (StringHelper::contains($path, $chroot)) {
                return true;
            }
        }
        return false;
    }
342377
public function isFile($path)
    {
        $parentDir = $this->dirname($path);
        return in_array($path, $this->files($parentDir));
    }
927787
public static function isAbsolutePath($path) : bool
    {
        // path already absolute?
        if ($path[0] === '/') {
            return true;
        }

        // Matches the following on Windows:
        //  - \\NetworkComputer\Path
        //  - \\.\D:
        //  - \\.\c:
        //  - C:\Windows
        //  - C:\windows
        //  - C:/windows
        //  - c:/windows
        if (defined('PHP_WINDOWS_VERSION_BUILD') && self::isAbsoluteWindowsPath($path)) {
            return true;
        }

        // Stream
        if (strpos($path, '://') !== false) {
            return true;
        }

        return false;
    }
1029897
public function withPath($path)
    {
        // if the path is absolute, then clear basePath
        if (substr($path, 0, 1) == '/') {
            $clone->basePath = '';
        }
        $this->path = $this->filterQuery($path);

        return $this;
    }
1231273
protected static function isAbsoluteWindowsRoot($path):bool
    {
        if (strlen($path) > 1 && ctype_alpha($path[0]) && ':' === $path[1]) {
            // Special win drive C:
            if (2 === strlen($path)) {
                return true;
            }
            // Normal win drive C:/  C:\
            if ('/' === $path[2] || '\\' === $path[2]) {
                return true;
            }
        }
        return false;
    }
1151546
public function has($path)
    {
        $x = $this->xpath($path);

        return count($x) ? true : false;
    }
203490
protected function filterPath($absolutePath)
    {
        // Unresolved paths with '..' are invalid
        if (Str::contains($absolutePath, '..')) return false;
        return Str::startsWith($absolutePath, $this->outputdir . '/');
    }