Here you can find the source of touch(File file)
Parameter | Description |
---|---|
file | The File to touch. |
public static void touch(File file)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { /**/* w w w .j av a 2 s .c om*/ * Touch (update the modification time) the given file. * * @param file The {@link File} to touch. */ public static void touch(File file) { file.setLastModified(System.currentTimeMillis()); } }