From Multi Theft Auto: Wiki

This function resolves a specified path into its absolute version. This function can be used to get a unique version of a path (without scripting symbols such as '..').


string translator.absPath ( string path )


  • path: the path that should be resolved into a absolute path; can be nil to return the absolute location of the current directory.


This function returns the absolute version of the path that is passed to it, false if the specified path is not accessible by the translator.


Click to collapse [-]

This snippet prints the absolute location of the shared client-side resource folder.

-- Get the absolute path to our resource.
local absResourceLocation = fileCreateTranslator( "/" ).absPath();

-- Print it out to the user.
outputChatBox( "running resource from: " .. absResourceLocation );

FileSystem Translator Functions