this question fits this topic:
creating a huge dummy file in seconds in C #
I just checked the fsutil.exe file in xp / vista / seven to write a huge amount of dummy data to the storage drive, and it takes less time to create such a large file compared to the programmatic way.
when I try to do the same with .net, it will take significantly longer than fsutil.exe
note: I know that .net does not use bcuz native code, that I just checked this problem with native api as well as follows:
long int size = DiskFree('L' - 64);
const char* full = "fulldisk.dsk";
__try{
Application->ProcessMessages();
HANDLE hf = CreateFile(full,
GENERIC_WRITE,
0,
0,
CREATE_ALWAYS,
0,
0);
SetFilePointer(hf, size, 0, FILE_BEGIN);
SetEndOfFile(hf);
CloseHandle(hf);
}__finally{
ShowMessage("Finished");
exit(0);
and the answer was equal to .net results.
fsutil.exe , , .net- , 2
:
400mb .net ~ 40
fsutil.exe 20 .
- ?
fsutil.exe , ?