import javax.jcr.Property;
import javax.jcr.PropertyIterator;
import javax.jcr.PropertyType;
+import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.nodetype.NodeType;
Node base = toNode(dir);
if (base == null)
throw new IOException(dir + " is not a JCR node");
- return new NodeDirectoryStream((JcrFileSystem) dir.getFileSystem(), base.getNodes(), filter);
+ JcrFileSystem fileSystem = (JcrFileSystem) dir.getFileSystem();
+ return new NodeDirectoryStream(fileSystem, base.getNodes(), fileSystem.listDirectMounts(dir), filter);
} catch (RepositoryException e) {
throw new IOException("Cannot list directory", e);
}
@Override
public FileStore getFileStore(Path path) throws IOException {
- Session session = ((JcrFileSystem) path.getFileSystem()).getSession();
- return new WorkSpaceFileStore(session.getWorkspace());
+ JcrFileSystem fileSystem = (JcrFileSystem) path.getFileSystem();
+ return fileSystem.getFileStore(path.toString());
}
@Override
public void checkAccess(Path path, AccessMode... modes) throws IOException {
- try {
- Session session = ((JcrFileSystem) path.getFileSystem()).getSession();
- if (!session.itemExists(path.toString()))
- throw new NoSuchFileException(path + " does not exist");
- // TODO check access via JCR api
- } catch (RepositoryException e) {
- throw new IOException("Cannot delete " + path, e);
- }
+ Node node = toNode(path);
+ if (node == null)
+ throw new NoSuchFileException(path + " does not exist");
+ // TODO check access via JCR api
}
@Override
*
* @return null by default
*/
- public Node getUserHome(Session session) {
+ public Node getUserHome(Repository session) {
return null;
}
+
}