MapGuide API Reference
|
virtual void MgResourceService::DeleteResource | ( | MgResourceIdentifier * | resource | ) | [pure virtual] |
Deletes an existing resource and its associated data from the repository.
virtual void DeleteResource(MgResourceIdentifier resource); |
virtual void DeleteResource(MgResourceIdentifier resource); |
virtual void DeleteResource(MgResourceIdentifier resource); |
resource | (MgResourceIdentifier) Resource identifier specifying the resource to delete. This can be a document or a folder. If it is a folder, this method deletes that folder, all resources in the folder, and any subfolders below it. If it is a folder, you must include the trailing slash in the identifier. |
// Assuming $resourceService is already initialized $resourceID = new MgResourceIdentifier("Library://Maps/World.MapDefinition"); $resourceService->DeleteResource($resourceID);
This example deletes a folder and all items beneath it:
$resourceID = new MgResourceIdentifier("Library://Maps/"); $resourceService->DeleteResource($resourceID);
This deletes all the resources in the library:
$resourceID = new MgResourceIdentifier("Library://"); $resourceService->DeleteResource($resourceID);
MgInvalidResourceTypeException |