The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



FileCopyFeedBk


Unit:SDL_filesys
Class:none
Declaration: function FileCopyFeedBk (SourceName, DestName: string; RemoveReadOnly: boolean; FeedbackProc: TFileCopyFeedBack): integer;

The function FileCopyFeedBk copies the file SourceName to the file DestName. The path of the destination file must be existing. If the parameter RemoveReadOnly is TRUE the read-only attribute is reset in the destination copy (i.e. when copying a file from CDROM the read-only attribute is not transferred to the harddisk). The parameter FeedBackProc defines the feeback routine which is called every 8 kB copied and at the start and at the end of the copying process. If no feedback should be given, FeedBackProc should be set to nil. The file copy process can be aborted by calling the procedure AbortAnyFileCopying. In this case the partial copy DestName is not removed from the disk and has to be removed manually.

Hint: If the parameter DestName contains an existing directory (instead of the destination file name) the file name of the SourceName is extracted and automatically appended to DestName.

On return, the function FileCopyFeedBk delivers the following error codes:

0 no error
-1 no such sources file
-2 cannot create destination file
-3 write error during copying
-4 read error during copying

Hint: The parameter RemoveReadOnly is ignored in the CLX version of the function.


Last Update: 2023-Feb-06