Wiki source code of !Test_file_path
Version 4.17 by Alexandru Colesnicov on 2019/10/02 14:15
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 | |||
![]() |
4.5 | 9 | att = doc.getAttachment("TestingData.xls") |
![]() |
4.17 | 10 | println ("att: variable got its value") |
| 11 | println ("att: Class is " + att.getClass().getSimpleName() + " (" + att.getClass().getName() + ")") | ||
![]() |
4.12 | 12 | |
![]() |
4.13 | 13 | xwa = att.getAttachment() |
![]() |
4.17 | 14 | println ("xwa: variable got its value") |
| 15 | println ("xwa: Class is " + xwa.getClass().getSimpleName() + " (" + xwa.getClass().getName() + ")") | ||
![]() |
4.13 | 16 | |
![]() |
4.15 | 17 | sfi = xwa.getAttachment_content().storageFile |
![]() |
4.17 | 18 | println ("sfi: variable got its value") |
| 19 | println ("sfi: Class is " + sfi.getClass().getSimpleName() + " (" + sfi.getClass().getName() + ")") | ||
![]() |
4.15 | 20 | |
| |
1.1 | 21 | {{/groovy}} |
