 |
| Setting the date and time that a file was created |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
Versions: click to open |
 |
|
 |
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 1790 bytes Created: 2001-07-25 12:00:00 Modified: 2011-12-10 09:20:22 Visits in 7 days: 85 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
The file handle must have been created with GENERIC_WRITE access to the file.
I tried to create the handle by using native FOPEN() function with different attributes. It did not work.
You can change any of three file time values or a combination of them. But not all file systems can record creation and last access time and not all file systems record them in the same manner. This way you can set the creation time to be later than its access and modification times.
* * *
In C# version, I use managed FileInfo object instead of accessing file times through the System.Runtime.InteropServices namespace. |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|