Java File Touch touchRecursive(File f, long timestamp)

Here you can find the source of touchRecursive(File f, long timestamp)

Description

touch Recursive

License

BSD License

Declaration

public static void touchRecursive(File f, long timestamp) 

Method Source Code

//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);
    }
}

Related

  1. touchFile(File directory, String name)
  2. touchFile(File file)
  3. touchFile(File file)
  4. touchFile(String target)
  5. touchOrCrash(File f)