views:

14

answers:

2

Is it possible to save a file's original create / modify dates when saving a file to a db (via filestream & BinaryReader) and then have those dates attached to the file when recreating the file, again via filestream & BinaryWriter, from the db? If possible, how do I do it?

My inital research leads me to believe only the file contents are being stored and retrieved.

A: 

You can add database columns for the data you want to save about your file. When you write a file to the database, put this information into the columns. When you read, change file properties according to the data from columns.

Athari
I thought this was going to be the answer but thought I'd ask anyway.
Scott
A: 

As suggested by Athari you can store those times in database columns and when you are recreating the file use System.IO.FileInfo. You can set all the time properties using this.