M MY Multiplayer: Wiki
Side
Kind

pathIsFile

Shared

Tells whether a path is a file. It does the same as fileExists.

bool pathIsFile(string path)

Parameters

NameTypeDescription
pathstringA path inside the calling resource, or @resource/path for another resource's file.

Returns

true if the path exists and is a file (not a folder).

Example

if pathIsFile("config.json") then
    local config = fromJSON(fileGetContents("config.json"))
end

See also