Very small and simple job.
Write a function in VB.NET that will just create a file filled with random data.
createDummyFile(filepath, filelength)
File can become small or very large (>8gb). Function performance should be at least 30MB/s.
## Deliverables
Use this
'create a binary file filled with random dummydata
'Byte data in the file should be random and contain values in range 0..255
'filepath=full path to the destination file, example C:\dd\[login to view URL]
'if folder is missing then the function should create it.
'length=exact size in bytes of the resulting file, can be small or very large eg. > 8GB
'Performance when creating large files should be at least 40MB/s
Function createDummyFile(ByVal filepath As String, ByVal length As Long) As String
'...Do your code here...
End Function
Function validateDummyFilePerformance() As Double
Dim starttime As Double = [login to view URL]
createDummyFile("C:\dd\[login to view URL]", 3) '3 bytes
createDummyFile("C:\dd\[login to view URL]", 1400000) '1.4 Million bytes
createDummyFile("C:\dd\[login to view URL]", 8200111222L) '8 GB
Dim executionTime = [login to view URL] - starttime '(seconds)
Return executionTime
End Function