private MoveItem ( string path, INodeFactory sourceNode, string destination ) : void | ||
path | string | |
sourceNode | INodeFactory | |
destination | string | |
Результат | void |
void MoveItem(string path, INodeFactory sourceNode, string destination)
{
var copy = GetCopyItem(sourceNode);
var remove = copy as IRemoveItem;
if (null == copy || null == remove)
{
WriteCmdletNotSupportedAtNodeError(path, ProviderCmdlet.MoveItem, MoveItemNotSupportedErrorID);
return;
}
if (!ShouldProcess(path, ProviderCmdlet.MoveItem ))
{
return;
}
try
{
DoCopyItem(path, destination, true, copy);
DoRemoveItem(path, true, remove);
}
catch( Exception e )
{
WriteGeneralCmdletError( e, MoveItemInvokeErrorID, path);
}
}
Provider::MoveItem ( string path, string destination ) : void |