addResourceConfig
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function adds a new empty config file to an existing resource.
Syntax
xmlnode addResourceConfig ( string filePath, [ string filetype = "server" ] )Required Arguments
- filePath: The filepath of the file to be created in the following format: ":resourceName/path" . 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- filetype (default: "server"): a string indicating whether the file is serverside ("server") or clientside ("client").
Returns
- xmlnode: value
Returns the new config's root xmlnode if the config was added successfully, false otherwise.
Code Examples
shared
function onStart() addResourceConfig(":ctf/settings.xml", "server")endaddEventHandler("onResourceStart",getResourceRootElement(),onStart)See Also
Resource Functions
- abortRemoteRequest
- addResourceConfig
- addResourceMap
- call
- callRemote
- copyResource
- createResource
- deleteResource
- fetchRemote
- getRemoteRequestInfo
- getRemoteRequests
- getResourceACLRequests
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceGUIElement
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceName
- getResourceOrganizationalPath
- getResourceRootElement
- getResources
- getResourceState
- getThisResource
- isResourceArchived
- isResourceProtected
- refreshResources
- removeResourceFile
- renameResource
- restartResource
- setResourceInfo
- startResource
- stopResource
- updateResourceACLRequest