Returns true if the given path is an absolute path

@param string $filePath
@return boolean
176076
protected function isAbsolutePath($filePath)
    {
        if ($filePath === null || $filePath === '') {
            return false;
        }
    
        if ($filePath[0] === DIRECTORY_SEPARATOR || preg_match('~\A[A-Z]:(?![^/\\\\])~i', $filePath) > 0) {
            return true;
        }
    
        return false;
    }
197501
protected function validatePath($path)
    {
        if (empty($path)) {
            return false;
        }

        // we are always operating from root directory
        // so forbid relative paths
        if (false !== strpos($path, '..')) {
            return false;
        }

        return true;
    }
257152
protected function readCacheFile($filePath)
    {
        if (file_exists($filePath)) {
            /** @noinspection PhpIncludeInspection */
            $map = require $filePath;
            if (is_array($map)) {
                $this->map = array_merge($this->map, $map);
            }

            return true;
        }

        return false;
    }
1087615
public static function getIncludePath($filepath)
    {
        static $_include_path = null;

        if ($_path_array === null) {
            $_include_path = explode(PATH_SEPARATOR, get_include_path());
        }

        foreach ($_include_path as $_path) {
            if (file_exists($_path . DS . $filepath)) {
                return $_path . DS . $filepath;
            }
        }
        
        return false;
    }
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;
    }
670936
protected static function verifyPath(string $path = ''): bool
    {
        static::init();
        $currentDir = '.'.DIRECTORY_SEPARATOR;
        return (\stripos($path, static::$documentRoot) !== false && \strpos($path, $currentDir) === false);
    }
509015
protected function isWritable($filePath)
    {
        return !is_dir($filePath)
            &&
            (file_exists($filePath) ? is_writable($filePath) : is_writable(dirname($filePath)));
    }
485947
protected function isMessagesExcluded($filePath)
    {
        if (empty($this->messagesIncluded)) {
            return false;
        }

        $filePath = str_replace(DIRECTORY_SEPARATOR, '/', $filePath);

        $localeDirSeparatorPosition = strpos($filePath, '/');
        $filePath = substr($filePath, $localeDirSeparatorPosition);
        $filePath = ltrim($filePath, '/');
        $filePath = substr($filePath, 0, -4);

        if (in_array($filePath, $this->messagesIncluded)) {
            return false;
        }

        return true;
    }
1234326
public static function isAnimated( $filePath ){
		$content	= file_get_contents( $filePath );
		$pos1		= 0;
		$count		= 0;
		while( $count < 2 ) # There is no point in continuing after we find a 2nd frame
		{
			$pos1	= strpos( $content, "\x00\x21\xF9\x04", $pos1 );
			if( $pos1 === FALSE )
				break;
			$pos2	= strpos( $content, "\x00\x2C", $pos1 );
			if( $pos2 === FALSE )
				break;
			else if( $pos1 + 8 == $pos2 )
				$count++;
			$pos1 = $pos2;
		}
		return $count > 1;
	}
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;
    }
749126
public static function fileExistsSafe(string $filePath) : bool
    {
        if ($filePath == '') {
            return false;
        }

        if (DirHelper::isDirSafe($filePath)) {
            return false;
        }

        return file_exists($filePath);
    }
22658
protected function _ensurePathExistence($filePath) {
        $folders = explode(DIRECTORY_SEPARATOR, $filePath);
        // discard the actual file
        array_pop($folders);
        $path = implode(DIRECTORY_SEPARATOR, $folders);
        if (file_exists($path)) {
            return;
        }
        mkdir($path, 0777, true);
    }
1035
public function isAncestorOf(AbsolutePathInterface $path)
    {
        if (!$this->matchesDriveOrNull($this->pathDriveSpecifier($path))) {
            return false;
        }

        return parent::isAncestorOf($path);
    }
1200570
public function isUploadedFile($filePath)
    {
        // If it's a serialized one.
        if (filter_var($filePath, FILTER_VALIDATE_URL)) {
            return true;
        }

        // If it's a normal filename.
        $file = $this->getUploadDir()->getFile($this->getUserDirectoryHash() . '/' . $filePath);
        if ($file->exists()) {
            return true;
        }

        return false;
    }
475513
public function isRelativePath($path)
    {
        if (strlen($path) === 0) {
            return true;
        }

        if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
            return !preg_match('/^[a-z]+\:\\\\/i', $path);
        }

        return strpos($path, DIRECTORY_SEPARATOR) !== 0;
    }
111541
public function isDirectory($path)
    {
        // The root is always a directory
        if($path == '/') {
            return true;
        }
        $parentDir = $this->dirname($path);
        return in_array($path, $this->directories($parentDir));
    }
669931
public static function isAbsolutePath($path)
    {
        if (isset($path[0]) and ($path[0] == '/' or $path[0] == '\\')) {
            return true;
        }
        if (preg_match('/^[A-Za-z0-9]+:/', $path) === 1) {
            return true;
        }
        return false;
    }