用Java模拟touch命令(Simulate touch command with Java)
我想修改二进制文件的修改时间戳。 这样做最好的方法是什么?
打开和关闭文件是一个很好的选择吗? (我需要一个解决方案,时间戳的修改将在每个平台和JVM上进行更改)。
I want to change modification timestamp of a binary file. What is the best way for doing this?
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类有一个setLastModified方法。 这就是ANT所做的。
The File class has a setLastModified method. That is what ANT does.
更多推荐
发布评论