Workspace.PendRename Method (String, String, LockLevel, Boolean, Boolean)

Moves or renames a file or directory.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public int PendRename(
	string oldPath,
	string newPath,
	LockLevel lockLevel,
	bool updateDisk,
	bool detectFolderAtTarget


Type: System.String

The current path to the item being renamed.

Type: System.String

The new path to the item.

Type: Microsoft.TeamFoundation.VersionControl.Client.LockLevel

The level of locking for the pending change.

Type: System.Boolean

True to update the local disk according to the pending changes. False to preview the number of items that were changed but not modify the disk.

Type: System.Boolean

True to search for a local folder that exists at the target and then notify the server. False not to search.

Return Value

Type: System.Int32
The number of items that were moved or renamed.

The oldPath parameter may contain wildcard characters if the target is a directory. The newPath parameter cannot have wildcard characters. If the target is an existing directory, the source will be moved to be a child of the target.