CfParser.normalizeIncludePath

string normalizeIncludePath(string path) @safe pure

Normalizes an include path for security validation.

This function:

  • Converts backslashes to forward slashes for consistent handling
  • Removes redundant separators (e.g., "a//b" → "a/b")
  • Resolves "." components
  • Preserves ".." components for later validation (not resolved here)

Parameters

pathThe raw path to normalize

Returns

Normalized path string.