Lua:extractFilePath
Jump to navigation
Jump to search
<> Reference
function extractFilePath(filepath) : string
Returns the path without the filename.
This function removes the filename from the given path and returns only the directory path.
Function Parameters
| Parameter | Type | Description |
|---|---|---|
| filepath | String | The path to remove the filename from. |
Returns
string — The directory path without the filename.
Examples
local path = extractFilePath("C:\\\\Temp\\\\example.txt")
print(path)
-- C:\\Temp\\
See Also
Main Pages