By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,782 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,782 IT Pros & Developers. It's quick & easy.

when writing out a file from .net, when is the file created? after the bytes are all written to the hard drive or before the bytes are written to the hard drive?

P: n/a
when writing out a file from .net, when is the file created? after the bytes
are all written to the hard drive or before the bytes are written to the
hard drive?
Sep 6 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Daniel,

Regarding this issue of the creation of the file before or after the ytes
are written to the hard drive, I would like to tell you that when using the
Stream classes of the 'System.IO' namespace, data is not written to the file
immediately. Instead, it is buffered to guarantee better performance for
file operations. You can call the 'Flush' method to make changes to the
stream persistent. Closing a file will also force writing data to the
physical disk.
Hence the file is created before the bytes are written to the hard drive.

Hope this helps.

Best Regards,

Mona [Grapecity]

"Daniel" <so*******************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
when writing out a file from .net, when is the file created? after the bytes are all written to the hard drive or before the bytes are written to the
hard drive?

Sep 8 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.