Lua:extractFilePath

From Cheat Engine
Jump to navigation Jump to search

<> Lua API 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\\

Main Pages

Core Lua documentation entry points

Lua
Script Engine