Nette\Utils\FileSystem::isAbsolute PHP Méthode

isAbsolute() public static méthode

Is path absolute?
public static isAbsolute ( $path ) : boolean
Résultat boolean
    public static function isAbsolute($path)
    {
        return (bool) preg_match('#([a-z]:)?[/\\\\]|[a-z][a-z0-9+.-]*://#Ai', $path);
    }

Usage Example

 /**
  * Is path absolute?
  *
  * @param string $path Path
  *
  * @return bool
  */
 public function isAbsolute($path)
 {
     return \Nette\Utils\FileSystem::isAbsolute($path);
 }