SPFile.MoveTo method (String, SPMoveOperations, Boolean)
將檔案移至指定的目的地 URL。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Sub MoveTo ( _
newUrl As String, _
flags As SPMoveOperations, _
requireWebFilePermission As Boolean _
)
'用途
Dim instance As SPFile
Dim newUrl As String
Dim flags As SPMoveOperations
Dim requireWebFilePermission As Boolean
instance.MoveTo(newUrl, flags, requireWebFilePermission)
public void MoveTo(
string newUrl,
SPMoveOperations flags,
bool requireWebFilePermission
)
參數
newUrl
Type: System.String指定目的地 URL。
flags
Type: Microsoft.SharePoint.SPMoveOperations指定移動作業的類型。必須是MoveOperations.Overwrite或MoveOperations.AllowBrokenThickets。
requireWebFilePermission
Type: System.Boolean移動作業需要Add and Customize Web Pages權限時移動檔案的副檔名已經和目的端 URL 的副檔名所屬的 web 應用程式的WebFileExtensions 。預設值是true。