SPFile.MoveTo Method

Definition

Overloads

MoveTo(String)
MoveTo(String, SPMoveOperations)
MoveTo(String, Boolean)
MoveTo(String, SPMoveOperations, Boolean)

MoveTo(String)

public:
 void MoveTo(System::String ^ newUrl);
public void MoveTo (string newUrl);
member this.MoveTo : string -> unit
Public Sub MoveTo (newUrl As String)

Parameters

newUrl
String

MoveTo(String, SPMoveOperations)

public:
 void MoveTo(System::String ^ newUrl, Microsoft::SharePoint::SPMoveOperations flags);
[Microsoft.SharePoint.Client.ClientCallable]
[Microsoft.SharePoint.Client.ClientCallableExceptionConstraint(Condition="There is an exclusive lock on the file", ErrorCode=-2147018887, ErrorType=typeof(Microsoft.SharePoint.SPFileLockException), FixedId="4")]
[Microsoft.SharePoint.Client.ClientCallableExceptionConstraint(Condition="The file is not locked", ErrorCode=-2147024729, ErrorType=typeof(Microsoft.SharePoint.SPFileLockException), FixedId="7")]
[Microsoft.SharePoint.Client.ClientCallableExceptionConstraint(Condition="There is a shared lock on the file", ErrorCode=-2147018894, ErrorType=typeof(Microsoft.SharePoint.SPFileLockException), FixedId="5")]
public void MoveTo (string newUrl, Microsoft.SharePoint.SPMoveOperations flags);
member this.MoveTo : string * Microsoft.SharePoint.SPMoveOperations -> unit
Public Sub MoveTo (newUrl As String, flags As SPMoveOperations)

Parameters

newUrl
String
Attributes

MoveTo(String, Boolean)

public:
 void MoveTo(System::String ^ newUrl, bool bOverWrite);
public void MoveTo (string newUrl, bool bOverWrite);
member this.MoveTo : string * bool -> unit
Public Sub MoveTo (newUrl As String, bOverWrite As Boolean)

Parameters

newUrl
String
bOverWrite
Boolean

MoveTo(String, SPMoveOperations, Boolean)

public:
 void MoveTo(System::String ^ newUrl, Microsoft::SharePoint::SPMoveOperations flags, bool requireWebFilePermission);
[Microsoft.SharePoint.Client.SubsetCallableExcludeMember(Microsoft.SharePoint.Client.SubsetCallableExcludeMemberType.PerSpec)]
public void MoveTo (string newUrl, Microsoft.SharePoint.SPMoveOperations flags, bool requireWebFilePermission);
member this.MoveTo : string * Microsoft.SharePoint.SPMoveOperations * bool -> unit
Public Sub MoveTo (newUrl As String, flags As SPMoveOperations, requireWebFilePermission As Boolean)

Parameters

newUrl
String
requireWebFilePermission
Boolean
Attributes

Applies to