Wiki source code of !Test_file_path
Version 4.14 by Alexandru Colesnicov on 2019/10/02 13:37
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 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; | ||
![]() |
4.12 | 11 | |
![]() |
4.5 | 12 | att = doc.getAttachment("TestingData.xls") |
![]() |
4.11 | 13 | println (att.getClass().getSimpleName() + " (" + att.getClass().getName() + ")") |
![]() |
4.12 | 14 | |
![]() |
4.13 | 15 | xwa = att.getAttachment() |
| 16 | println (xwa.getClass().getSimpleName() + " (" + xwa.getClass().getName() + ")") | ||
| 17 | |||
![]() |
4.8 | 18 | //aco = att.getAttachment_content() |
![]() |
4.12 | 19 | |
| |
1.1 | 20 | // for (XWikiAttachment attach in doc.getAttachmentList()) { |
| 21 | // println "** " + attach.filename; | ||
| 22 | // } | ||
| 23 | //println y; | ||
| 24 | {{/groovy}} |
