Lua:extractFilePath

From Cheat Engine
Revision as of 16:49, 21 June 2026 by Leunsel (talk | contribs) (Initial page creation.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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[edit]

Parameter Type Description
filepath String The path to remove the filename from.

Returns[edit]

string — The directory path without the filename.

Examples[edit]

local path = extractFilePath("C:\\\\Temp\\\\example.txt")

print(path)
-- C:\\Temp\\

See Also[edit]

Main Pages