RemoveResourceFile
From Multi Theft Auto: Wiki
This function removes a file from the resource.
Syntax
bool removeResourceFile ( resource theResource, string fileName )
OOP Syntax Help! I don't understand this!
- Method: resource:removeFile(...)
Required Arguments
- theResource: The resource element.
- fileName: The filename what you wan't to delete.
Returns
Returns true if file was deleted, otherwise false if the resource is in use or the file doesn't exist.
Example
This example removes a .txt file from the resource sx_remanager(in-game script editor) when started. (TESTED!)
addEventHandler("onResourceStart",resourceRoot,function() resource = getResourceFromName("sx_resmanager") removeResourceFile(resource,"description.txt") end)
See Also
- addResourceConfig
- addResourceMap
- call
- callRemote
- copyResource
- createResource
- deleteResource
- fetchRemote
- getResourceACLRequests
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceName
- getResourceOrganizationalPath
- getResourceRootElement
- getResourceState
- getResources
- getThisResource
- isResourceArchived
- refreshResources
- removeResourceFile
- renameResource
- restartResource
- setResourceInfo
- startResource
- stopResource
- updateResourceACLRequest
- getRemoteRequests
- getRemoteRequestInfo
- abortRemoteRequest