Here you can find the source of touchRecursive(File f, long timestamp)
public static void touchRecursive(File f, long timestamp)
//package com.java2s; /***/* w w w . jav a2s.c o m*/ * Copyright (C) 2010 Johan Henriksson * This code is under the Endrov / BSD license. See www.endrov.net * for the full text and how to cite. */ import java.io.File; public class Main { public static void touchRecursive(File f, long timestamp) { f.setLastModified(timestamp); File parent = f.getParentFile(); if (parent != null) touchRecursive(parent, timestamp); } }