Lists.CheckInFile method
允許要存回至 SharePoint 文件庫從遠端的文件。
Namespace: WebSvcLists
Assembly: STSSOAP (in STSSOAP.dll)
Syntax
'宣告
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/CheckInFile", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/", _
ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function CheckInFile ( _
pageUrl As String, _
comment As String, _
CheckinType As String _
) As Boolean
'用途
Dim instance As Lists
Dim pageUrl As String
Dim comment As String
Dim CheckinType As String
Dim returnValue As Boolean
returnValue = instance.CheckInFile(pageUrl, _
comment, CheckinType)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/CheckInFile", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/",
ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public bool CheckInFile(
string pageUrl,
string comment,
string CheckinType
)
參數
pageUrl
Type: System.String內含要存回的文件的完整路徑的字串。
comment
Type: System.String包含選用存回註解的字串。
CheckinType
Type: System.String字串表示的值,0、 1 或 2 中,其中 0 = MinorCheckIn,1 = MajorCheckIn,且 2 = OverwriteCheckIn。
傳回值
Type: System.Boolean
true如果作業成功 ;否則,請false。
Examples
下列範例會檢查子網站的檔案共用的文件中。
Dim listService As New Web_Reference_Folder.Lists()
listService.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim fileCheckin As String = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt"
Dim myResults As Boolean = listService.CheckIn(fileCheckin, "Completed revision.", "1")
Web_Reference_Folder.Lists listService = new Web_Reference_Folder.Lists();
listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
string fileCheckin = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt";
bool myResults = listService.CheckIn(fileCheckin, "Completed revision.", "1");