不怎么明白你的意思?
建一字段设置“考试截止时间”,然后再答题的时间判断时间是否有效,就OK了吧?
你是说的安装文件的时间属性?
普通文件?
文件有好几个时间属性,比如Access Time,CreateTime。
你可以通过File类的几个静态方法来改变文件的时间属性。
SetCreationTime | Sets the date and time the file was created. | |
SetCreationTimeUtc | Sets the date and time, in coordinated universal time (UTC), that the file was created. | |
SetLastAccessTime | Sets the date and time the specified file was last accessed. | |
SetLastAccessTimeUtc | Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed. | |
SetLastWriteTime | Sets the date and time that the specified file was last written to. |
我有一个笨办法:你创建一个新的文件夹,把东西复制进去,如果文件夹下的时间也需要改,你就重新编辑一下保存就可以了。