Is there anyway to modify stat information like mtime or ctime manually in Python or any language at all?

后端 未结 3 1916
独厮守ぢ
独厮守ぢ 2020-12-10 09:35

I am trying the following code:

os.stat(path_name)[stat.ST_CTIME] = ctime

However, this gives the following error:

exceptio         


        
3条回答
  •  独厮守ぢ
    2020-12-10 10:23

    GNU stroke implements the change-system-time trick to change ctime of a file. If that's what you want, GNU stroke does it for you: http://stroke.sourceforge.net/.

提交回复
热议问题