Check if file exists in DAM or Site admin of Adobe Experience Manager | Community
Skip to main content
New Participant
October 5, 2017
Solved

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

  • October 5, 2017
  • 4 replies
  • 4362 views

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.
Best answer by smacdonald2008

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

Resource res = resourceResolver.getResource(location);

4 replies

halinggAuthor
New Participant
February 24, 2018

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

Thank you for helping!

Singaiah_Chintalapudi
New Participant
October 6, 2017

You can use the Sling API as Scott mentioned.

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 6, 2017

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

Resource res = resourceResolver.getResource(location);

Himanshu_Singhal
New Participant
October 6, 2017

Hi,

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

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

Regards

Himanshu