Tutorial :Does a Stream from a file contain the source file's attributes?


I'm trying to understand how File attributes such as the Created and Modified dates relate to a System.IO.Stream or System.IO.FileStream to the file. Are these attributes contained in the stream, or is the data part of the file that is read by the Stream separate from the file attributes?


The separation goes all the way back to the disk, the metadata for a file is stored in a distinct location from the file data. A "directory entry" in Windows. It is otherwise the job of the operating system to maintain this data. Those dates are automatically updated when you create or write the file. Read them back in a program with the FileInfo class.


File attributes are not part of file's content. They are implemented differently by different file systems, and the OS provides API for working with them.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »