src/Path.php
public static function IsAbsolute( string $path, bool $dependToOS = true ) : bool
   {
      if ( \is_null( $path ) || \strlen( $path ) < 1 )
      {
         return false;
      }
      if ( $dependToOS )
      {
         if ( ! \IS_WIN )
         {
            return $path[ 0 ] == '/';
         }
         if ( \strlen( $path ) < 2 )
         {
            return false;
         }
         return $path[ 1 ] == ':' || ( $path[ 0 ] == '\\' && $path[ 1 ] == '\\' );
      }
      return $path[ 0 ] == '/' || $path[ 1 ] == ':' || ( $path[ 0 ] == '\\' && $path[ 1 ] == '\\' );
   }
public static function IsAbsolute( string $path, bool $dependToOS = true ) : bool
   {
      if ( \is_null( $path ) || \strlen( $path ) < 1 )
      {
         return false;
      }
      if ( $dependToOS )
      {
         if ( ! \IS_WIN )
         {
            return $path[ 0 ] == '/';
         }
         if ( \strlen( $path ) < 2 )
         {
            return false;
         }
         return $path[ 1 ] == ':' || ( $path[ 0 ] == '\\' && $path[ 1 ] == '\\' );
      }
      return $path[ 0 ] == '/' || $path[ 1 ] == ':' || ( $path[ 0 ] == '\\' && $path[ 1 ] == '\\' );
   }
public static function IsAbsolute ( string $ path , bool $ dependToOS = true ) : bool { if ( \ is_null ( $ path ) || \ strlen ( $ path ) < 1 ) { return false ; } if ( $ dependToOS ) { if ( ! \ IS_WIN ) { return $ path [ 0 ] == '/' ; } if ( \ strlen ( $ path ) < 2 ) { return false ; } return $ path [ 1 ] == ':' || ( $ path [ 0 ] == '\\' && $ path [ 1 ] == '\\' ) ; } return $ path [ 0 ] == '/' || $ path [ 1 ] == ':' || ( $ path [ 0 ] == '\\' && $ path [ 1 ] == '\\' ) ; }
Returns if the defined path is a absolute path definition.

@param  string  $path
@param  boolean $dependToOS
@return boolean
Returns if the defined path is a absolute path definition .