Lua
C++
Edit

CasedPath

This function returns a file path with capitalization fixed to match the existing file on the hard drive. It will also convert backslashes to forward slashes. The specified file must exist.

Syntax

Parameter Description
path the file path to use

Returns

Returns the file path with corrected capitalization.

Example

local path = CurrentDir()

-- Convert to lowercase
path = path:Lower()
Print("Lowercase path: ")
Print(path)
Print("")

-- Correct case
path = CasedPath(path)
Print("Corrected path: ")
Print(path)
Copyright © 2024 Ultra Software.
All rights reserved.