How do I list current files in a document library?
I have a document library that I would like to get the list of file names and put them into a string[] array. Can someone give me some sample code of ho开发者_如何学编程w this would look like?
Assuming you need server side object model (for a WebPart or a statndalone tool to run on the server). Please look at the SPDocumentLibrary class that has sample listing names of the items in a document library - http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spdocumentlibrary.aspx.
精彩评论