M MY Multiplayer: Wiki
Side
Kind

getResourceFiles

Shared

Lists the files a resource declares with <file> in its meta.xml, with patterns already expanded, in alphabetical order.

table|false getResourceFiles(resource|string resource)

Parameters

NameTypeDescription
resourceresource|stringThe resource, or its name.

Returns

A table of the paths inside the resource, or false if the resource does not exist.

Example

for _, path in ipairs(getResourceFiles(getThisResource())) do
    outputDebugString(path)
end
NoteOn the server, the list is only built when the resource starts; a stopped resource returns an empty table.

See also