我正在将.NET内核用于在Linux机器上运行的应用程序(确切地说是一个docker容器)
如何将二进制文件从那里复制到Windows网络共享(包括用户名和密码)?
我发现的所有解决方案都是特定于Windows的,但与Linux无关.
我使用SharePoint客户端对象模型编写了一个小应用程序,该模型重命名SharePoint 2010文档库中的所有文件.一切都运行良好,除非文件名中间应包含一个点,它将被修剪,从点开始.
例如,当新文件名应为" my fi.le name "时,它最终会在SharePoint中显示" my fi ".顺便说一句,文件的扩展名(在我的例子中是.pdf)保持正确.
这是我正在做的(一般):
ClientContext clientContext = new ClientContext("http://sp.example.com/thesite);
List list = clientContext.Web.Lists.GetByTitle("mydoclibrary");
ListItemCollection col = list.GetItems(CamlQuery.CreateAllItemsQuery());
clientContext.Load(col);
clientContext.ExecuteQuery();
foreach (var doc in col)
{
if (doc.FileSystemObjectType == FileSystemObjectType.File)
{
doc["FileLeafRef"] = "my fi.le name";
doc.Update();
clientContext.ExecuteQuery();
}
}
Run Code Online (Sandbox Code Playgroud)
当我通过浏览器(编辑属性)手动重命名SharePoint中的文件时,一切都按预期工作:点保持不变,文件名根本不会被修剪.
是"FileLeafRef"错误的财产?任何想法是什么原因在这里?