【发布时间】:2018-06-14 01:47:33
【问题描述】:
我已经在 AEM 中安装了 groovyconsole,并且有一堆我想保存在文件中作为输出的东西。
在this 的帖子之后,我尝试了:
def filePath = "/content/corporate/reports/output.csv"
File output = new File(filePath)
output.append('Hello world!')
我最终得到一个 FileNotFoundException。我直接创建文件只是为了确保,但这也无济于事。
不胜感激。谢谢。
【问题讨论】:
-
看起来您正在使用 JCR 路径(节点路径)。使用 File 表示“文件系统”上的文件,而不是 JCR 路径(节点路径)。您是否要保存到 JCR?如果是这样,那就是不同的 API
标签: groovy aem groovy-console