[mapguide-users] Check if resource exists in repository
Tony Tang
tony.tang at autodesk.com
Mon Dec 4 10:59:55 EST 2006
Try using
MgResourceService::EnumerateResources(MgResourceIdentifier * resource, INT32
depth, CREFSTRING type) on the Library resources.
It will return a MgByteReader object if the resource exists or
an exception if it doesn't.
You can test it with the http://<machine>/mapguide/mapagent/index.html page.
TT
-----Original Message-----
From: Steve Dang
Sent: Thursday, November 30, 2006 11:19 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Check if resource exists in repository
Hi Adria`,
There is currently no such API.
You can use the GetResourceContent API which returns the resource or throws an exception if the resource does not exist.
Steve.
-----Original Message-----
From: Adrià Mercader [mailto:amptarraco at hotmail.com]
Sent: Thursday, November 30, 2006 5:52 AM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] Check if resource exists in repository
Hi everybody,
hope anyone can help me with this,
Is there a way to check if a resource already exists in the repository
(Session or Library) i.e.
Session:$sessionId/POIs.FeatureSource
or
Library://Barcelona/Data/POIs.FeatureSource
something like:
$rsId = new MgResourceIdentifier(Session:$sessionId/POIs.FeatureSource);
if (! lostFunctionToCheckIfResourceExists($rsId)) {
createResource();
}
Thanks in advance!
_________________________________________________________________
Moda para esta temporada. Ponte al día de todas las tendencias.
http://www.msn.es/Mujer/moda/default.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org
More information about the Mapguide_users
mailing list