utime
only modifies accessed and modified times. Is there a way to do modify the creation/birth time with Python?
Filesystem is ZFS if that matters.
Asked
Active
Viewed 94 times
-1
-
[How can I set file creation times in ZFS?](https://stackoverflow.com/q/29906359/5160244) is somewhat related. – Velvel Mar 06 '22 at 00:37
1 Answers
0
You want touch
functionality, and it's available in the os
module using utime()
.
See https://docs.python.org/3.8/library/os.html#os.utime, and also Implement touch using Python?

James McPherson
- 2,476
- 1
- 12
- 16
-
But utime only supports modification and accessed times, not birth/creation times. – churchill Mar 05 '22 at 23:49