I am creating folders in SP using webdav with HttpWebRequest, MKCOL method.
And I upload files using WebClient.
For both uploaded files and created folders, how
You can use following code for that
//Change the file created time.
File.SetCreationTime(path, dtCreation);
//Change the file modified time.
File.SetLastWriteTime(path, dtModified);
string path = @"c:\DirName";
Directory.SetLastWriteTime(path, DateTime.Now);
dt = Directory.GetLastWriteTime(path);