获取存储子站点文档库的文件元数据信息 [英] Get File metadata information stored subsite document library
问题描述
我需要创建审核日志报告Web部件 主页,显示以下列
标题,作者,修改日期。
审计查询提供存储在根站点和子站点中的所有文件。
要获取元数据信息,需要实例化spsite site =新的spsite(&/ site / subsite1")。openweb
To get the meta data information need to instantiate spsite site =new spsite ("/site/subsite1").openweb
当网站包含许多子网站时,上述方法是不切实际的。
the above approach in unrealistic when site contains many subsites.
有没有简单的方法传递文件的整个网址并获取元数据信息。
Is there any simple way passing entire url of the file and get the metadata information.
请注意我我正在使用GetFile("/ **。pdf")方法在根网站上获取元数据信息
Please note that i am getting metadata information in the root site using GetFile("/**.pdf") method
问候,
Patil
推荐答案
你好ppatil12,
Hi ppatil12,
我担心没有仅通过基于服务器端对象模型传递文件的整个URL来获取元数据信息的简单方法。
I am afraid that there is no simple way to get the metadata information only by passing entire url of the file based on Server Side Object Model.
如果站点包含许多子站点,您可以循环这些子站点以获取元数据信息文件。
If the site contains many subsites, you could loop these subsites to get metadata information of the files.
更多参考:
按完整网址检索SPFile对象。
Retrieve SPFile object by full URL.
https://sacarter.wordpress.com/2011/11/28/retrieve-spfile -object-by-full-url /
最佳r egards,
Best regards,
Sara Fan
这篇关于获取存储子站点文档库的文件元数据信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!