Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Retrieve a library's directory using VB

$
0
0

I apologize in advance if I am using any incorrect nomenclature.

We have a sharepoint site "http://company_SP/FUBAR", and within the site there are multiple libraries: "ZZ Data", "DD Data", "DD Controlled Data", ...

I want to retrieve the web directory for a particular library using VB.  For example: The web address to the "DD Controlled Data" is "http://company_SP/FUBAR/DD%20Controlled", so given the library name "DD Controlled Data" I want to programmatically look up "DD%20Controlled".

I can retrieve the files that are in the library using code like this:

' Connect to the SharePoint Server
Dim clientContext As New Microsoft.SharePoint.Client.ClientContext(SITE_URL)
clientContext.Credentials = New System.Net.NetworkCredential(USERNAME, PASSWORD)
Dim documentsList As Microsoft.SharePoint.Client.List = clientContext.Web.Lists.GetByTitle(LIBRARY)

' Retrieve all the files in this library
Dim lic As ListItemCollection = documentsList.GetItems(CamlQuery.CreateAllItemsQuery())
clientContext.Load(lic)
clientContext.ExecuteQuery()

For Each l As ListItem In lic
...
Can someone point me in the right direction on how to access the metadata/properties of a specific LIBRARY itself (not the files within the library)?


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>