+ /**
+ * Whether a content exist at his relative path. The default implementation call
+ * {@link #get(ProvidedSession, String)} and check whether a
+ * {@link ContentNotFoundException} is thrown or not. It should be overridden as
+ * soon as there is a mechanism to check existence before actually getting the
+ * content.
+ */
+ default boolean exists(ProvidedSession session, String relativePath) {
+ try {
+ get(session, relativePath);
+ return true;
+ } catch (ContentNotFoundException e) {
+ return false;
+ }
+ }