GetResourceOrganizationalPath: Difference between revisions
Jump to navigation
Jump to search
(Added example) |
m (→Returns) |
||
Line 13: | Line 13: | ||
===Returns=== | ===Returns=== | ||
Returns the organizational | Returns the organizational folder name of the [[resource]]. It returns empty string if the resource is on root ''resources'' folder. It returns '''false''' if the resource could not be found. | ||
==Example== | ==Example== |
Revision as of 14:14, 7 April 2020
This function returns the organizational file path (e.g. [admin]) of a resource.
Syntax
string getResourceOrganizationalPath ( resource theResource )
OOP Syntax Help! I don't understand this!
- Method: resource:getOrganizationalPath (...)
Required Arguments
- theResource: the resource of which you want to know the organizational path
Returns
Returns the organizational folder name of the resource. It returns empty string if the resource is on root resources folder. It returns false if the resource could not be found.
Example
This example outputs the path of the current resource when it is started.
addEventHandler("onResourceStart", resourceRoot, function () outputChatBox(getResourceName(resource) .. "'s path: " .. getResourceOrganizationalPath(resource)) end)
See Also
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo