简体   繁体   English

python os.utime不会更新访问时间

[英]python os.utime doesn't update the access time

I'm trying to modify the access timestamp and modify timestamp of a remote file I'm using the following line: 我正在尝试使用以下行修改访问时间戳和修改远程文件的时间戳:

os.utime(filePath, (1267533581,1267090862))

the modify timestamp get updated but the access timestamp doesn't 修改时间戳得到更新,但是访问时间戳没有

I have tried to use this on a local file on a local file and everything is working well I'm working on windows. 我尝试在本地文件上的本地文件上使用它,并且一切正常,而我正在Windows上工作。 the file system is NTFS 文件系统是NTFS

Perhaps the last access time is disabled on your system. 也许您的系统上次访问时间已禁用。 This could have been done for performance purposes. 出于性能目的,可以这样做。 It's controlled by a registry setting. 它由注册表设置控制。 See: 看到:

http://www.pctools.com/guides/registry/detail/50 http://www.pctools.com/guides/registry/detail/50

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM