Function sanitizeFilePath

  • Sanitize and normalize the file path to prevent command injection.

    Parameters

    • filePath: string

      The path to sanitize.

    Returns string

    The sanitized file path.