Wiki source code of !Test_file_path

Version 4.6 by Alexandru Colesnicov on 2019/10/02 13:21

Show last authors
1 {{groovy}}
2 import com.xpn.xwiki.*;
3 import com.xpn.xwiki.api.*;
4 import com.xpn.xwiki.doc.*;
5 import org.apache.commons.io.FileUtils;
6 import java.io.File;
7 import java.net.URL;
8
9 // y=XWikiAttachment(xwiki.getDocument(doc.parent), "aFileVerified").getAttachment_content().storageFile;
10 //y=xwiki.getDocument(doc.parent).XWikiAttachment.getAttachment_content().storageFile;
11
12 att = doc.getAttachment("TestingData.xls")
13 sfi = att.getAttachment_content().storageFile
14
15 // for (XWikiAttachment attach in doc.getAttachmentList()) {
16 // println "** " + attach.filename;
17 // }
18 //println y;
19 {{/groovy}}