Skip to main content
Oct 5, 2017 10:18 PM UTC
Solved

Check if file exists in DAM or Site admin of Adobe Experience Manager

Hi everyone,

Is there an efficient way to check if a file/resource exists in the system?

Thank you!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 6, 2017 6:47 PM UTC

You can use this API to see if a resource exists a specific location:

Resource res = resourceResolver.getResource(location);

4 replies

Himanshu_Singhal
Community Advisor
Community Advisor
Oct 6, 2017 7:34 AM UTC

Hi,

To check if the resource exists in JCR, you can use ResourceUtil API.

ResourceUtil ("The Adobe AEM Quickstart and Web Application.")

Regards

Himanshu

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 6, 2017 6:47 PM UTC

You can use this API to see if a resource exists a specific location:

Resource res = resourceResolver.getResource(location);

Translate
Singaiah_Chintalapudi
Level 7
Oct 6, 2017 8:49 PM UTC

You can use the Sling API as Scott mentioned.

Translate
halinggAuthor
Feb 24, 2018 10:53 AM UTC

Is there a way to do this using a curl command?

Thank you for helping!

Translate