Improve ACR.
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / acr / fs / FsContentProvider.java
index 62b20af3df7570df6380a06671dedcc14e26a717..9d696b07f1cbcf6609f50c29017576250af228f0 100644 (file)
@@ -33,7 +33,7 @@ public class FsContentProvider implements ContentProvider {
        public FsContentProvider(String mountPath, Path rootPath) {
                Objects.requireNonNull(mountPath);
                Objects.requireNonNull(rootPath);
-               
+
                this.mountPath = mountPath;
                this.rootPath = rootPath;
                // FIXME make it more robust
@@ -112,7 +112,7 @@ public class FsContentProvider implements ContentProvider {
        }
 
        @Override
-       public ProvidedContent get(ProvidedSession session, String mountPath, String relativePath) {
+       public ProvidedContent get(ProvidedSession session, String relativePath) {
                return new FsContent(session, this, rootPath.resolve(relativePath));
        }
 
@@ -120,6 +120,11 @@ public class FsContentProvider implements ContentProvider {
         * NAMESPACE CONTEXT
         */
 
+       @Override
+       public boolean exists(ProvidedSession session, String relativePath) {
+               return Files.exists(rootPath.resolve(relativePath));
+       }
+
        @Override
        public String getNamespaceURI(String prefix) {
                return NamespaceUtils.getNamespaceURI((p) -> prefixes.get(p), prefix);