Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Set Creation Date on zipEntry

$
0
0

Hi,

Q: How can I set the Creation DateTime of the file?

In the zip samples (https://github.com/icsharpcode/SharpZipLib/wiki/Zip-Samples) on the compressing of folder, it uses:

ZipEntry newEntry = new ZipEntry(entryName);
newEntry.DateTime = fi.LastWriteTime; // Note the zip format stores 2 second granularity

However, the newEntry.DateTime = fi.LastWriteTime; only sets the Modified Date Time of the file. Thus, upon extraction, the files being extracted has the Creation Date Time similar to the Date Time on extraction, which should not be the case. The Creation Date Time should be the original date time before compression.

 

*Note: If possible, may I know how can I set Last Accessed Date Time too?

 

Many Thanks!

 

Best Regards,

MrMaMaLuLu


Viewing all articles
Browse latest Browse all 1764

Trending Articles