Can anybody please explain to me what this code will do to the copy?
vb Code:
Using source As New IO.FileStream("source path here", IO.FileMode.Open) Using target As New IO.FileStream("destination path here", IO.FileMode.Create) Const BUFFER_SIZE As Integer = 1024 Dim buffer(BUFFER_SIZE - 1) As Byte Dim bytesRead As Integer = source.Read(buffer, 0, BUFFER_SIZE) While bytesRead > 0 target.Write(buffer, 0, bytesRead) bytesRead = source.Read(buffer, 0, BUFFER_SIZE) End While target.Close() End Using source.Close() End Using




Reply With Quote
