0

I am trying to create a txt file under /conf but got this error:

Exception occurred: This tree does not exist

Here is the simplified version of my code - ignoring the file content:

Session session = resourceResolver.adaptTo(Session.class);
Node confNode = session.getNode("/conf");
Node fileNode = confNode.addNode("helloworld.txt", "nt:file");
session.save();

Am I missing anything? /conf path exists in CRXDE so I am not sure why it says the tree does not exist. I have also make sure the SystemUser.yaml has the write and read permission under /conf

superninja
  • 3,114
  • 7
  • 30
  • 63

0 Answers0