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

Provides callback function for file/directory copy operation

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

Syntax

C#
public delegate PathCopyCallbackResult PathCopyCallBack(
	string SourceFileName,
	long TotalSize,
	long BytesCopyed,
	string TargetFileName
)
Visual Basic
Public Delegate Function PathCopyCallBack ( _
	SourceFileName As String, _
	TotalSize As Long, _
	BytesCopyed As Long, _
	TargetFileName As String _
) As PathCopyCallbackResult
Visual C++
public delegate PathCopyCallbackResult PathCopyCallBack(
	String^ SourceFileName, 
	long long TotalSize, 
	long long BytesCopyed, 
	String^ TargetFileName
)
F#
type PathCopyCallBack = 
    delegate of 
        SourceFileName:string * 
        TotalSize:int64 * 
        BytesCopyed:int64 * 
        TargetFileName:string -> PathCopyCallbackResult
JScript
JScript does not support delegates.

Parameters

SourceFileName
Type: System..::..String
Full path of source file currently being copyied.
Note
This argument is usually null. It is non-unly only when callback function is called for the first tame for single file. Subsequent calls for the same file has this argument null.
TotalSize
Type: System..::..Int64
Total size, in bytes, of source file
BytesCopyed
Type: System..::..Int64
Number of bytes already succesfully copied from SourceFileName to TargetFileName.
TargetFileName
Type: System..::..String
Full path of targte file SourceFileName is being copied to.
Note
Null when SourceFileName is null.

Return Value

Value indicating how to continue the operation. By default this delegate should return Ignore (which meants that operation will continue). This delegate shall not return Retry unless SourceFileName is not null.

Remarks

When SourceFileName is not null BytesCopyed is always zero. When callback function returns Retry in such situation, copying of file SourceFileName is skipped.

When callback function returns Cancel or Abort no cleenup is done (only all opened files are closed). Half-copyied target files is leftin file system. You should delete the file.

See Also