Windows Dev Center

ContainerCmdletProvider.CopyItem Method

Copies an item from one path to another.


Namespace: System.Management.Automation.Provider
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim path As String
Dim copyPath As String
Dim recurse As Boolean

Me.CopyItem(path, copyPath, recurse)

protected virtual void CopyItem (
	string path,
	string copyPath,
	bool recurse
)
protected void CopyItem (
	String path, 
	String copyPath, 
	boolean recurse
)
protected function CopyItem (
	path : String, 
	copyPath : String, 
	recurse : boolean
)

Parameters

path

The path of the item that is being copied.

copyPath

The path to where the item is copied to.

recurse

Instructs the provider to recursively copy all items.

This method does not return anything. For output, it must call the WriteItemObject method.

This method defines provider-specific functionality for the Copy-Item cmdlet. If this implementation of the cmdlet requires addition parameters, the provider must also call the CopyItemDynamicParameters method.

For more information about implementing providers (including samples), see Writing a Windows PowerShell Provider.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms


Show:
© 2015 Microsoft