コード例 #1
0
ファイル: ListExtentions.cs プロジェクト: 3gbywork/SPCB
        /// <summary>
        /// Returns the WebDav URL for the current list.
        /// </summary>
        /// <param name="web"></param>
        /// <remarks>A webdav URL looks like: \\webapplicationurl@SSL\DavWWWRoot\sites\sitecollection</remarks>
        /// <returns></returns>
        public static string GetListWebDavUrl(this SPClient.List list)
        {
            Uri    listUri   = new Uri(list.GetListUrl());
            string webDavUrl = string.Format("\\\\{0}@SSL\\DavWWWRoot{1}", listUri.DnsSafeHost, listUri.AbsolutePath.Replace('/', '\\'));

            return(webDavUrl);
        }