Modding Tools > Lucas' Simpsons Hit & Run Mod Launcher > Hacks > Mod Requirable Hacks > Custom Files > Custom Lua Functions > General Functions > GetPathParent

GetPathParent

Returns the parent path of the specified file path.

This will return the file name if it is only given a file name.

Syntax

GetPathParent( <path>, [<windows>] )
  • path: The file path that you want to get the parent path out of.
  • windows: TODO
    • Optional.

Examples

-- Returns "scripts\missions\level01"
GetPathParent("scripts\\missions\\level01\\level.mfk")

-- Returns "level.mfk"
GetPathParent("level.mfk")

Notes

No additional notes.

Version History

Unknown Version

Added this function.

Donut Team © 2023 · v4.0