CryoEnix
Well-known member
Hey all!
Im currently working on a file downloading program, and am brainstorming on the best way to write the files to disk. Heres a hypothetical:
I have a file to download, lets say for arguments sake its exactly one gig in size. before I begin the download, I set a filestream to pad out the target file with a gigs worth of zeros, to create the initial file.
Now, say I run through the download and after every filestream.write() that amounts to 2 meg or so, I flush the file to actually write this data to disk. Will this flush simply replace the zeros in question with the new binary data (the GOOD scenario), or will the entire one gig file be rewritten in its entirety (the BAD scenario)?
Any further insight into efficient, potentially large file writing would help - cheers in advance!
Im currently working on a file downloading program, and am brainstorming on the best way to write the files to disk. Heres a hypothetical:
I have a file to download, lets say for arguments sake its exactly one gig in size. before I begin the download, I set a filestream to pad out the target file with a gigs worth of zeros, to create the initial file.
Now, say I run through the download and after every filestream.write() that amounts to 2 meg or so, I flush the file to actually write this data to disk. Will this flush simply replace the zeros in question with the new binary data (the GOOD scenario), or will the entire one gig file be rewritten in its entirety (the BAD scenario)?
Any further insight into efficient, potentially large file writing would help - cheers in advance!