-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Description
With the touch function you can set the modification and access time, but not the creation/change time. I have several Windows applications where I need to set the creation time, for example a backup tool that needs to preserve the creation time. I have solved that with a C program that can set creation, modification and access times and that can be invoked from PHP using (Unix) sockets. But that is a relatively complicated solution, it would be much simpler/neater if you could set the creation time using touch.
It would also be nice if the copy function would have a flag to preserve ctime, mtime and a time. In that case a touch to reset ctime, mtime and atime would not be needed at all. But I have a PHP tool that sets ctime and mtime of JPG files based on the ctime and mtime in the Exif header, for that I need the touch solution. A flag in the copy function would be a partial solution, setting ctime with touch is a more general and complete solution.