From Multi Theft Auto: Wiki
Revision as of 17:16, 22 October 2016 by Qaisjp (talk | contribs) (fix version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function retrieves the path of the given file.


string fileGetPath ( file theFile )

Required Arguments

  • theFile: The file you want to get the path.


Returns a string representing the file path, false if invalid file was provided.


Click to collapse [-]
Server Example 1
local newFile = fileCreate("test.txt")                -- attempt to create a new file
if (newFile) then                                       -- check if the creation succeeded
    local path = fileGetPath(newFile)
    outputChatBox("New file created at: "..path, root, 0, 255, 0)
    fileClose(newFile)                                -- close the file once you're done with it

See Also