Gentee Programming Language > Documentation > Libraries | Download documentation |
In the process of copying the function copyfiles generates various messages and you can specify a function to handle them. The function must have the following structure:
func uint yourfunc( uint code, uint left, uint right )
The code parameter is the code of the message and the type of the other two parameters depends on code of the message.
Message code Description Second parameter Third parameter $COPYN_FOUND The object for copying is found The finfo structure about the found file or directory str with the name of the target file or directory $COPYN_NEWDIR A directory is created str - directory name $COPYN_ERRDIR Cannot create a directory str - directory name $COPYN_ASK Copy request finfo - source file finfo - existing file $COPYN_ERRFILE Error while creating a file str - file name $COPYN_NEWFILE A file is created str - file name $COPYN_BEGIN Start copying file finfo - source file str - target file $COPYN_PROCESS A file is being copied str - target file name uint - progress of copying $COPYN_END Copying is over finfo - source file str - target file $COPYN_ERRWRITE Error while writing a file str - file name
By default, the function must return 0 or $COPYR_NOTHING, but the following variants are possible for some messages.
Message code Return values $COPYN_ERRDIR $COPYR_RETRY - retry
$COPYR_BREAK - stop copying$COPYN_ASK $COPYR_OVER - overwrite
$COPYR_SKIP - skip
$COPYR_OVERALL - copy this file and all the rest
$COPYR_SKIPALL - skip this file and all the rest
$COPYR_BREAK - stop copying$COPYN_ERRFILE
$COPYN_ERRWRITE$COPYR_RETRY - retry
$COPYR_BREAK - stop copying
$COPYR_SKIP - skip
You can use the console message handler defcopyproc and specify &defcopyproc as a function for handling messages.
![]() |
![]() Copyright © 2004-2006 Gentee Inc. All rights reserved. ![]() |