



function FastCopyFile ( const ASourceFileName, ADestinationFileName : TFileName CopyMode : TFastCopyFileMode Callback : TFastCopyFileNormalCallback Callback2 : TFastCopyFileMethodCallback ): Boolean overload constīUFFER_SIZE = 524288 // 512KB blocks, change this to tune your speed var Buffer : array of Byte ASourceFile, ADestinationFile : THandle FileSize, BytesRead, BytesWritten, BytesWritten2, TotalBytesWritten, CreationDisposition : Int64 CanContinue, CanContinueFlag : Boolean īFS : TBaseCachedFileStream begin FileSize := 0 TotalBytesWritten := 0 CanContinue := True SetLength ( Buffer, BUFFER_SIZE ) // Manage the Creation Disposition flag CreationDisposition := CREATE_ALWAYS if CopyMode = fcfmAppend then CreationDisposition := OPEN_ALWAYS // Opening the source file in read mode ASourceFile := OpenLongFileName ( ASourceFileName, GENERIC_READ, 0, OPEN_EXISTING ) īFS := TBaseCachedFileStream. Can anyone give example codes in DELPHI when using unit BufferedFileStream & FastCopy for Copy paste a file?
