[This is preliminary documentation and is subject to change.]

Used to provide custom error handling during file/directory copy operation

Namespace:  Tools.IOt
Assembly:  Tools (in Tools.dll) Version: 1.5.2.0

Syntax

C#
public delegate PathCopyCallbackResult PathCopyErrorCallBack(
	string SourceFileName,
	string TargetFileName,
	PathCopyStages Stage,
	Exception Exception
)
Visual Basic (Declaration)
Public Delegate Function PathCopyErrorCallBack ( _
	SourceFileName As String, _
	TargetFileName As String, _
	Stage As PathCopyStages, _
	Exception As Exception _
) As PathCopyCallbackResult
Visual C++
public delegate PathCopyCallbackResult PathCopyErrorCallBack(
	String^ SourceFileName, 
	String^ TargetFileName, 
	PathCopyStages Stage, 
	Exception^ Exception
)
J#
/** @delegate */
public delegate PathCopyCallbackResult PathCopyErrorCallBack(
	String SourceFileName,
	String TargetFileName,
	PathCopyStages Stage,
	Exception Exception
)
JScript
JScript does not support delegates.

Parameters

SourceFileName
Type: System..::.String
Full path of source file or directory currently being copyied
TargetFileName
Type: System..::.String
Full path of target file or directory - target of SourceFileName
Stage
Type: Tools.IOt..::.PathCopyStages
Identifies process stage where exception have occured
Exception
Type: System..::.Exception
The exception.

When Exception is FileAlreadyExistsException return Retry to overwrite the file.

Return Value

A value indicating how to recover from the error

Remarks

When copy operation fails during source-read -> target-write process, no cleenup is done (but all opened files are closed). Caller you should delete half-copyied target file.

See Also