public static function path( string $path ): string {

    if( !isset( self::$cache[ $path ] ) ) {

      // deep normalization if the path contains one-dir-up segment (clean multiple separators)
      $_path = preg_replace( '#\\' . static::DIRECTORY_SEPARATOR . '+#', static::DIRECTORY_SEPARATOR, ltrim( $path, static::DIRECTORY_SEPARATOR ) );

      $tmp      = explode( static::DIRECTORY_SEPARATOR, $_path );
      $segments = [];
      foreach( $tmp as $segment ) {
        if( $segment != static::DIRECTORY_CURRENT ) {

          $last = empty( $segments ) ? '' : $segments[ count( $segments ) - 1 ];
          if( $segment != static::DIRECTORY_PREVIOUS || in_array( $last, [ '', static::DIRECTORY_PREVIOUS ] ) ) $segments[] = $segment;
          else array_pop( $segments );
        }
      }

      $_path = implode( static::DIRECTORY_SEPARATOR, $segments );

      // check for root voilation
      if( preg_match( addcslashes( '#^' . static::DIRECTORY_PREVIOUS . '(' . static::DIRECTORY_SEPARATOR . '|$)#', './' ), $_path ) ) {
        throw new FilePathInvalidException( $path );
      }

      self::$cache[ $path ] = $_path;
    }

    return self::$cache[ $path ];
  }