用Java模拟触摸命令 [英] Simulate touch command with Java

查看:113
本文介绍了用Java模拟触摸命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改二进制文件的修改时间戳.最好的方法是什么?

I want to change modification timestamp of a binary file. What is the best way for doing this?

打开和关闭文件会是一个不错的选择吗? (我需要一个解决方案,其中将在每个平台和JVM上更改时间戳的修改.)

Would opening and closing the file be a good option? (I require a solution where the modification of the timestamp will be changed on every platform and JVM).

推荐答案

File类具有

The File class has a setLastModified method. That is what ANT does.

这篇关于用Java模拟触摸命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆