本文整理了Java中com.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin.getFileTreeList()
方法的一些代码示例,展示了ZipExplorerPlugin.getFileTreeList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipExplorerPlugin.getFileTreeList()
方法的具体详情如下:
包路径:com.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin
类名称:ZipExplorerPlugin
方法名:getFileTreeList
[英]Finds the ZIP attachment with passed name from the passed document matching and parse the ZIP to generate a list of com.xpn.xwiki.objects.classes.ListItem elements representing a tree view of all directories and files in the ZIP. For example the following zip: <<$0$>>
generates the following ListItem list: <<$1$>>
[中]从匹配的传递文档中查找具有传递名称的ZIP附件,并解析该ZIP以生成com的列表。xpn。xwiki。物体。上课。ListItem元素表示ZIP中所有目录和文件的树视图。例如,以下zip:<<$0$>>
生成以下列表项列表:<<$1$>>
代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core
/**
* Finds the ZIP attachment with passed name from the passed document matching and parse the ZIP to generate a list
* of {@link com.xpn.xwiki.objects.classes.ListItem} elements representing a tree view of all directories and files
* in the ZIP. For example the following zip:
*
* <pre>
* zipfile.zip:
* Directory/File.txt
* File2.txt
* </pre>
*
* generates the following ListItem list:
*
* <pre>
*
* { id = "Directory/", value = "Directory", parent = ""}
* { id = "Directory/File.txt", value = "File.txt", parent = "Directory/"}
* { id = "File2.txt", value = "File2.txt", parent = ""}
*
* </pre>
*
* @param document the document containing the ZIP file as an attachment
* @param attachmentName the name under which the ZIP file is attached in the document
* @return a tree view list of {@link com.xpn.xwiki.objects.classes.ListItem} elements representing the content of
* the ZIP file
*/
public List<ListItem> getFileTreeList(Document document, String attachmentName)
{
return getProtectedPlugin().getFileTreeList(document, attachmentName, getXWikiContext());
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-zipexplorer
/**
* Finds the ZIP attachment with passed name from the passed document matching and parse the ZIP to generate a list
* of {@link com.xpn.xwiki.objects.classes.ListItem} elements representing a tree view of all directories and files
* in the ZIP. For example the following zip:
*
* <pre>
* zipfile.zip:
* Directory/File.txt
* File2.txt
* </pre>
*
* generates the following ListItem list:
*
* <pre>
*
* { id = "Directory/", value = "Directory", parent = ""}
* { id = "Directory/File.txt", value = "File.txt", parent = "Directory/"}
* { id = "File2.txt", value = "File2.txt", parent = ""}
*
* </pre>
*
* @param document the document containing the ZIP file as an attachment
* @param attachmentName the name under which the ZIP file is attached in the document
* @return a tree view list of {@link com.xpn.xwiki.objects.classes.ListItem} elements representing the content of
* the ZIP file
*/
public List<ListItem> getFileTreeList(Document document, String attachmentName)
{
return getProtectedPlugin().getFileTreeList(document, attachmentName, getXWikiContext());
}
内容来源于网络,如有侵权,请联系作者删除!